## Modular Exponentiation of Complex Numbers

Given four integers A, B, K, M. The task is to find (A + iB)K % M which is a complex number too. A +… Read More »

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

Given four integers A, B, K, M. The task is to find (A + iB)K % M which is a complex number too. A +… Read More »

The standard Tower of Hanoi problem is explained here . In the standard problem, all the disc transactions are considered identical. Given a 3×3 matrix… Read More »

Given an in-order traversal of a cartesian tree, the task is to build the entire tree from it. Examples: Input: arr[] = {1, 5, 3}… Read More »

Given an array arr[] of size N and an integer K, the task is to find the Kth smallest element from the array in constant… Read More »

Complexities like O(1) and O(n) are simple to understand. O(1) means it requires constant time to perform operations like to reach an element in constant… Read More »

Given an array arr[] of length N, the task is to find the sum of the maximum elements of every possible sub-array of the array.… Read More »

Given three array A[], B[] and C[] of N integers each. The task is to find the count of triplets (A[i], B[j], C[k]) such that… Read More »

Given a 2d-matrix consisting of positive integers, the task is to find the minimum number of steps required to reach the end of the matrix.… Read More »

Given a 2d-matrix consisting of positive integers, the task is to find the minimum number of steps required to reach the end(leftmost-bottom cell) of the… Read More »

Given an array of size N, initially consists of zeroes only. The task is to apply given operation q times and find the number of… Read More »

Given an array arr[] of integers, the task is to find the maximum sum sub-array among all the possible sub-arrays. Examples: Input: arr[] = {-2,… Read More »

Interactive Problems are those problems in which our solution or code interacts with the judge in real time. When we develop a solution for an… Read More »

Given an array arr[] of size N. There are two types of operations: Update(l, r, x) : Increment the a[i] (l <= i <= r)… Read More »

Given a sorted array arr[] of distinct elements which is rotated at some unknown point, the task is to find the maximum element in it.… Read More »

Introsort(Introspective sort) is a comparison based sort that consists of three sorting phases. They are Quicksort, Heapsort, and Insertion sort. Basic concepts of Introsort and… Read More »