## Find 2^(2^A) % B

Given two integers A and B, the task is to calculate 22A % B. Examples: Input: A = 3, B = 5 Output: 1 223… Read More »

- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Merge K sorted arrays of different sizes | ( Divide and Conquer Approach )
- Maximum element in a sorted and rotated array
- Interactive Problems in Competitive Programming
- Search element in a Spirally sorted Matrix
- Count the triplets such that A[i] < B[j] < C[k]
- Minimum steps to delete a string by deleting substring comprising of same characters
- Maximum Sum SubArray using Divide and Conquer | Set 2
- Lazy Propagation in Segment Tree | Set 2
- Generate a random permutation of elements from range [L, R] (Divide and Conquer)
- Sum of maximum of all subarrays | Divide and Conquer
- Find minimum steps required to reach the end of a matrix | Set - 1
- IntroSort or Introspective sort
- Largest number N which can be reduced to 0 in K steps
- Find minimum steps required to reach the end of a matrix | Set 2
- Find 2^(2^A) % B
- Kth smallest element in the array using constant space when array can't be modified
- Minimum operations of the given type required to make a complete graph
- Complexity Analysis of Binary Search
- Find the value of XXXX.....(N times) % M where N is large
- Find the number of different numbers in the array after applying the given operation q times
- Sum of i * countDigits(i)^2 for all i in range [L, R]
- Cost Based Tower of Hanoi
- Cartesian tree from inorder traversal | Segment Tree

Given two integers A and B, the task is to calculate 22A % B. Examples: Input: A = 3, B = 5 Output: 1 223… Read More »

Given three integers X, N and M. The task is to find XXX…(N times) % M where X can be any digitfrom the range [1,… Read More »

Given a string str. You are allowed to delete only some contiguous characters if all the characters are same in a single operation. The task… Read More »

Given a range [L, R], the task is to find the sum i * countDigits(i)2 for all i ∈ [L, R] where countDigits(i) is the… Read More »

Given a spirally sorted matrix with N * N elements and an integer X, the task is to find the position of this given integer… Read More »

Given k sorted arrays of different length, merge them into a single array such that the merged array is also sorted. Examples: Input : {{3,… Read More »

Given a range [L, R] where L ≤ R, the task is to generate a random permutation of the sequence [L, L + 1, L… Read More »

Giving k sorted arrays, each of size N, the task is to merge them into a single sorted array. Examples: Input : arr[][] = {{5,… Read More »

Given N vertex where N is even. Initially there is no edge between any of the vertices. You are allowed to perform operation as illustrated… Read More »

Given a number X, the task is to find the minimum number N such that total set bits of all numbers from 1 to n… Read More »

Given a string S containing lowercase latin letters. A character c is called K-amazing if every substring of S with length atleast K contains this… Read More »

Given an array of N integers where array elements form a strictly decreasing and increasing sequence. The task is to find the smallest number in… Read More »

Given an array arr[] of N integers and number of queries Q. The task is to answer three types of queries. Update [l, r] –… Read More »

Given an integer k and a monotonic increasing sequence: f(n) = an + bn [log2(n)] + cn^3 where (a = 1, 2, 3, …), (b… Read More »

Given an array of n integers. The task is to find the largest number which is a perfect square. Print -1 if there is no… Read More »