## Check whether there exists a triplet (i, j, k) such that arr[i] < arr[k] < arr[j] for i < j < k

Given an array arr[], the task is to check that if there exist a triplet (i, j, k) such that arr[i]<arr[k]<arr[j] and i<j<k then print… Read More »

- Minimize the maximum difference between adjacent elements in an array
- Number of pairs in an array with the sum greater than 0
- Minimum salary hike for each employee such that no employee feels unfair
- Extended Knapsack Problem
- Huffman Coding using Priority Queue
- Maximum profit by buying and selling a share at most K times | Greedy Approach
- Find lexicographically smallest string in at most one swaps
- Why Prim’s and Kruskal's MST algorithm fails for Directed Graph?
- Shortest path in a directed graph by Dijkstra’s algorithm
- Find the Mth element of the Array after K left rotations
- Sum of all subarrays of size K
- Count subarrays having sum of elements at even and odd positions equal
- Maximum size of square such that all submatrices of that size have sum less than K
- Longest increasing sub-sequence formed by concatenating array to itself N times
- Count the elements having frequency equals to its value
- Maximum Possible Rating of a Coding Contest
- Count number of triangles possible for the given sides range
- Minimum cost to make an Array a permutation of first N natural numbers
- Find the maximum sum (a+b) for a given input integer N satisfying the given condition
- Number of containers that can be filled in the given time
- Proof that traveling salesman problem is NP Hard
- Queries to check if any non-repeating element exists within range [L, R] of an Array
- Lexicographical smallest number after at most K consecutive swaps
- Count of N digit Numbers whose sum of every K consecutive digits is equal
- Find the largest number smaller than integer N with maximum number of set bits
- Length of the Smallest Subarray that must be removed in order to Maximise the GCD
- Find subarray of Length K with Maximum Peak
- Minimum number of colors required to color a Circular Array
- Maximum sum subarray of size range [L, R]
- Replace each element of Array with it's corresponding rank

Given an array arr[], the task is to check that if there exist a triplet (i, j, k) such that arr[i]<arr[k]<arr[j] and i<j<k then print… Read More »

Given a list of N distinct integers and a list of N-1 inequality signs, the task is to insert the integers between the inequality signs,… Read More »

Given a sorted array arr[] of N distinct positive integers. The task is to generate an array such that the element at each index in… Read More »

Given an integer N, the task is to print all the possible ways in which N can be written as the sum of two or… Read More »

Given an array of items, an ith index element denotes the item id’s, and given a number m, the task is to remove m elements… Read More »

Given non-negative integers K, M, and an array arr[] with N elements find the Mth element of the array after K left rotations. Examples: Input:… Read More »

Given a matrix mat[][], pair of indices X and Y, the task is to find the number of moves to bring all the non-zero elements… Read More »

Given a string str, the task is to check whether the given string is linear or not. If it is linear then print “Yes” else… Read More »

Given an Undirected Graph consisting of N vertices and M edges, where node values are in the range [1, N], and vertices specified by the… Read More »

Given an array arr[] of integers, the task is to find the total count of subarrays such that the sum of elements at even position… Read More »

Given a Binary Tree, the task is to find the maximum value of GCD from any path from the root node to the leaf node.… Read More »

Given a string str, the task is to check if string str is a substring of an infinite length string S in which lowercase alphabets… Read More »

Given an array arr[], the task is to rearrange the array to generate maximum decreasing subsequences and print the count of the maximum number of… Read More »

Given four integers N, X, P, and Q, the task is to find the minimum cost to make N to 1 by the following two… Read More »

Given an integer N and two arrays increasing[] and decreasing[], such that they have elements from 1 to N only. The task is to find… Read More »