Relation between HCF and LCM
Lowest Common Multiple (LCM) and the Highest Common Factor (HCF), are closely connected. They play a key role in simplifying mathematical statements, prime factorization, and finding relationships between numbers, especially when dealing with fractions. To understand the relationship between the HCF and LCM of two or more numbers, one must grasp the concepts of LCM and HCF and know how to apply the relevant formulas....
read more
Subtraction of Decimal
Subtraction of decimals is finding the difference between two or more decimal numbers and other numbers like whole, decimal, or natural numbers. The subtraction of decimals is similar to the subtraction of whole numbers....
read more
Count of Binary strings having at most X consecutive 1s and Y consecutive 0s
Given two integers N and M (1 ≤ N, M ≤ 100) denoting the total number of 1s and 0s respectively. The task is to count the number of possible arrangements of these 0s and 1s such that any arrangement has at most X consecutive 1s and Y consecutive 0s (1 ≤ X, Y ≤ 10). As the number of arrangements can be very large, compute the answer with MODULO 109+7....
read more
Number of Binary Search Trees of height H consisting of H+1 nodes
Given a positive integer H, the task is to find the number of possible Binary Search Trees of height H consisting of the first (H + 1) natural numbers as the node values. Since the count can be very large, print it to modulo 109 + 7....
read more
Minimize cost of increments or decrements such that same indexed elements become multiple of each other
Given two arrays A[] and B[] consisting of N integers, the task is to minimize the total cost of incrementing or decrementing array elements by 1 such that for every ith element, either A[i] is a multiple of B[i] or vice-versa....
read more
MakeMyTrip Interview Experience | Set 8 (On-Campus)
MakeMyTrip recently visited our campus. There were 4 rounds....
read more
Find remainder of array multiplication divided by n
Given multiple numbers and a number n, the task is to print the remainder after multiply all the number divide by n....
read more
Find minimum and maximum number of terms to divide N as sum of 4 or 6
Given an integer N, the task is to find the minimum and the maximum number of terms required to divide N as the sum of 4 or 6....
read more
Java Program To Multiply Two Numbers Represented By Linked Lists
Given two numbers represented by linked lists, write a function that returns the multiplication of these two linked lists....
read more
Find the Nth term of the series 1 + 2 + 6 + 15 + 31 + 56 + …
Given an integer . The task is to write a program to find the N-th term of the given series:...
read more
Write program to calculate pow(x, n)
Given two integers x and n, write a function to compute xn. We may assume that x and n are small and overflow doesn’t happen....
read more
Sum of n digit numbers divisible by a given number
Given n and a number, the task is to find the sum of n digit numbers that are divisible by given number.Examples:...
read more