Compute the maximum power with a given condition
Given 3 integers N, M, and K. The task is to find maximum P such that N * KP ? M....
read more
Program for power of a complex number in O(log n)
Given a complex number of the form x + yi and an integer n, the task is to calculate the value of this complex number raised to the power n.Examples:...
read more
Minimize cost to buy N elements using given cost Array
Given 2 arrays num[] and cost[] containing the number of elements and the cost to buy that many elements respectively. {i.e. cost[i] is the cost to buy num[i] elements}. The task is to minimize the cost to buy exactly N elements....
read more
Tail Recursion in Python Without Introspection
These are the special type of recursive functions, where the last statement executed inside the function is the call to the function itself....
read more
Compute power of power k times % m
Given x, k and m. Compute (xxxx…k)%m, x is in power k times. Given x is always prime and m is greater than x....
read more
Minimize sum of incompatibilities of K equal-length subsets made up of unique elements
Given an array arr[] consisting of N integers and an integer K, the task is to find the minimum sum of incompatibilities of K subsets of equal sizes having unique elements....
read more
Maximum sum of K elements selected from a Matrix
Given a positive integer K and a matrix arr[][] of dimensions N*M consisting of integers, the task is to find the maximum sum of K elements possible from the given matrix....
read more
Recursive Program to find Factorial of a large number
Given a large number N, the task is to find the factorial of N using recursion....
read more
Count sequences of length K having each term divisible by its preceding term
Given two integer N and K, the task is to find the number of sequence of length K consisting of values from the range [1, N], such that every (i + 1)th element in the sequence is divisible by its preceding ith element....
read more
Count number of pairs with the given Comparator
Given an array arr[], the task is to count the number of pairs (arr[i], arr[j]) on the right of every element with any custom comparator....
read more
Goldman Sachs Interview Experience | Campus drive for summer internship 2021 – IIT(BHU)
The process consisted of 1 online coding round , 3  tech interview rounds and 1 HR interview round....
read more
Count all pairs of divisors of a number N whose sum is coprime with N
Given an integer N, the task is to count all pairs of divisors of N such that the sum of each pair is coprime with N.Examples:...
read more