## Largest subset with M as smallest missing number

Given an array arr[] of N positive integers and a positive integer M, the task is to find the length of longest subset whose smallest… Read More »

- Must do Math for Competitive Programming
- Array of Vectors in C++ STL
- Breadth First Search without using Queue
- Minimize the maximum difference between adjacent elements in an array
- How is the time complexity of Sieve of Eratosthenes is n*log(log(n))?
- Shortest Path Faster Algorithm
- Maximum sum path in a Matrix
- Basic Algorithm Techniques Not Taught in Academics
- Role of SemiColon in various Programming Languages
- Maximum number of unique values in the array after performing given operations
- Sum of GCD of all possible sequences
- Traveling Salesman Problem using Genetic Algorithm
- Minimum Cost Graph
- Median of an unsorted array using Quick Select Algorithm
- Maximum LCM among all pairs (i, j) from the given Array
- Count of subarrays which start and end with the same element
- Word Break Problem | DP-32 | Set - 2
- Huffman Coding using Priority Queue
- Find lexicographically smallest string in at most one swaps
- Kth most frequent Character in a given String
- Operator Overloading '<<' and '>>' operator in a linked list class
- Longest Mountain Subarray
- Check if sum of any subarray is Palindrome or not
- What is a Webcrawler and where is it used?
- 0/1 Knapsack Problem to print all possible solutions
- Sort an Array which contain 1 to N values in O(N) using Cycle Sort
- Minimum increment or decrement required to sort the array | Top-down Approach
- Find maximum subset sum formed by partitioning any subset of array into 2 partitions with equal sum
- Find last remaining element after reducing the Array
- Longest common subarray in the given two arrays

Given an array arr[] of N positive integers and a positive integer M, the task is to find the length of longest subset whose smallest… Read More »

Given a weighted directed graph consisting of V vertices and E edges. The task is to print the cyclic path whose sum of weight is… Read More »

Given a binary tree, the task is to find the absolute difference between the even valued and the odd valued nodes in a binary tree.… Read More »

Given an array arr[] of size N, the task is to find the number of non-empty subsequences from the given array such that no two… Read More »

Prerequisites: Diameter of a N-ary tree Path between two nodes in a graph Given a N-ary tree with N nodes numbered from 0 to N-1… Read More »

Given a matrix of size N x M and an integer X, the task is to find the number of sub-squares in the matrix with… Read More »

Given an array arr[] of size N, the task is to rearrange the array elements such that for every index i(1 <= i <= N… Read More »

Given an undirected graph with V vertices and E edges, the task is to print all the independent sets and also find the maximal independent… Read More »

Given a number N, the task is to find the sum of Hamming difference of consecutive numbers from 0 to N. Hamming Distance between two… Read More »

Given an arr[] of size N whose elements are sorted in descending order. The task is to find if the given array can be sorted… Read More »

Given an integer N, the task is to find its perfect square root by repeated subtraction only. Examples: Input: N = 25 Output: 5 Input:… Read More »

Given two integers N and K, the task is to find the maximum number of inversion in a sequence of first N natural numbers after… Read More »

Given three positive integers N, A, and B, the task is to check if it is possible to obtain N by adding or subtracting A… Read More »

Given an array A[] of size N, the task is to maximize the count of distinct elements in the array by inserting the absolute differences… Read More »

Given two arrays A[] and B[] of equal size N, the task is to check whether A[] can be made equal to B[] by reversing… Read More »