Problem Statement: Given an integer N, write a program to count the number of digits in N. Examples Example 1:
Continue readingCategory: Maths
Power of Two
Problem Statement: Given a positive integer, we have to check whether it is a power of two or not. Examples:
Continue readingCount Trailing Zeroes
Problem Statement: “Given an integer n, return the number of trailing zeroes in n!. Note that n! = n *
Continue readingBitwise Operators in C++
In this article, we will learn about all Bitwise Operators in CPP. What are Operators? In programming languages, the operator
Continue readingPrint all Divisors of a given Number
Problem Statement: Given a number, print all the divisors of the number. A divisor is a number that gives the
Continue readingConvert Decimal to Binary Number
Problem Statement: Convert decimal to binary number. Examples: Example 1: Input: N = 15 Output: 1111 Explanation: 15 in binary
Continue readingExpress given number as Sum of Two Prime Numbers
Problem: Given a number n, express the number as a sum of 2 prime numbers. Examples: Example 1: Input :
Continue readingCalculate the Power of a Number : Binary Exponentiation
Problem Statement: Find the Power of a number. Examples: Example 1: Input: N = 5, k=3 Output: 125 Explanation: Since
Continue readingRearrange array in increasing-decreasing order
Problem Statement: Rearrange the array such that the first half is arranged in increasing order, and the second half is
Continue readingSum of the Numbers in a String
Problem: Given a string, calculate the sum of numbers in a string (multiple consecutive digits are considered one number) Examples:
Continue reading