Skip to content

Tag Archives: maths-log

Given a positive integer N, the task is to count the number of different bases in which, when N is represented, the most significant bit… Read More
Given an array arr[] consisting of N integers, the task is to find the sum of array elements that are equidistant from the two consecutive… Read More
Given a positive integer N, the task is to find the count of integers from the range [1, N] such that the integer cannot be… Read More
Given a string S consisting of N lowercase alphabets, the task is to remove the characters from the string whose frequency is not a power… Read More
Given an array arr[] consisting of N positive integers and two positive integers A and B, the task is to replace each array element with… Read More
Given an array arr[] consisting of N integers and a positive integer K, the task is to find the array elements having frequencies in the… Read More
Given an integer num, the task for every digit of the number is to find the highest power of 2 not exceeding that digit. Examples:… Read More
Given an array arr[] of size N, the task is to print the nearest power of 2 for each array element. Note: If there happens to… Read More
Given two integers N and K, the task is to find the count of all possible N-digit numbers having sum of every K consecutive digits… Read More
Logarithm: is the inverse function of the exponentiation which means the logarithm value of a given number x is the exponent to another number.  Below… Read More
Given two positive integers X and Y, the task is to find the MSB of X, in the given base Y.Examples: Input: X = 55,… Read More
Given an integer N, the task is to find the highest power of 2 that is smaller than or equal to N. Examples:  Input: N… Read More
Given two integers a and b, the task is to find the log of a to any base b, i.e. logb a.Examples: Input: a =… Read More
Given a number N, the task is to find the log value of the factorial of N i.e. log(N!).Note: ln means log with base e.Examples:  … Read More
Logarithm is an important topic that needs to be prepared well for the Quantitative Aptitude section of exams in India. It requires practicing a lot… Read More