## Printing longest Increasing consecutive subsequence

Given n elements, write a program that prints the longest increasing subsequence whose adjacent element difference is one. Examples: Input : a[] = {3, 10,… Read More »

- Count number of triplets with product equal to given number with duplicates allowed | Set-2
- Sum of all odd frequency elements in an array
- Elements that occurred only once in the array
- Remove duplicates from unsorted array
- Longest subarray having maximum sum
- Minimum number of changes required to make the given array an AP
- Replace every elements in the array by its frequency in the array
- Find the element having different frequency than other array elements
- Map elements of an array to elements of another array
- Queries to check if a number lies in N ranges of L-R
- Count pairs from two arrays having sum equal to K
- Longest arithmetic progression with the given common difference
- Largest element in the array that is repeated exactly k times
- Find maximum vertical sum in binary tree
- Counting frequencies of array elements
- Find the k smallest numbers after deleting given elements
- Distinct Prime Factors of Array Product
- Check if the array has an element which is equal to sum of all the remaining elements
- Minimum removals from array to make GCD greater
- Frequency Measuring Techniques for Competitive Programming
- Remove elements that appear strictly less than k times
- Find the smallest after deleting given elements
- Find the k largest numbers after deleting the given elements
- Find alphabet in a Matrix which has maximum number of stars around it
- unordered_map bucket() in C++ STL
- Maximum length substring with highest frequency in a string
- Array elements with prime frequencies
- Find two non-overlapping pairs having equal sum in an Array
- Number of comparisons in each direction for m queries in linear search
- Count majority element in a matrix

Given n elements, write a program that prints the longest increasing subsequence whose adjacent element difference is one. Examples: Input : a[] = {3, 10,… Read More »

Given N elements, write a program that prints the length of the longest increasing subsequence whose adjacent element difference is one. Examples: Input : a[]… Read More »

Prerequisite : Unordered maps in STL Unordered_map : unordered_map is an associated container that stores elements formed by the combination of key value and a… Read More »

Given an array of n integers, slope of a line i. e., m and the intercept of the line i.e c, Count the number of… Read More »

Given an array of N numbers. Find out the number of pairs i and j such that i < j and Ai and Aj have… Read More »

Given a binary tree, find the vertical width of the binary tree. Width of a binary tree is the number of vertical paths. Examples: Input… Read More »

Given two strings A and B. Minimize the number of unique characters in string A by either swapping A[i] with B[i] or keeping it unchanged.… Read More »

Given a linked list. We need to find unique elements in the linked list i.e, those elements which are not repeated in the linked list… Read More »

Given N(very large), task if to print the largest palindromic number obtained by permuting the digits of N. If it is not possible to make… Read More »

Given an array of N numbers, the task is to answer Q queries of the following type:- query(start, end) = Number of times a number… Read More »

Given a set S (all distinct elements) of integers, find the largest d such that a + b + c = d where a, b,… Read More »

Given an unsorted array of integers, find number of subarrays having sum exactly equal to a given number k. Examples: Input : arr[] = {10,… Read More »

Given an array of size N with repeated numbers, You Have to Find the top three repeated numbers. Note : If Number comes same number… Read More »

Given an array arr[] of n positive integer. The task is find the size of the subset formed from the elements of the given array… Read More »

Find the first non-repeating element in a given array of integers. Examples: Input : -1 2 -1 3 2 Output : 3 Explanation : The… Read More »