Skip to content

Category Archives: Hash

Given an array arr[] of N elements, the task is to find the length of the longest increasing subsequence whose adjacent element difference is one. â€¦ Read More
Given two arrays a[] and b[] of length N and an integer K (1 ≤ K ≤ N). All the integers in array a[] lie… Read More
Given an array arr[] of N integers, the task is to find the count of elements in the array which are present K times and… Read More
Given two strings A and B each of length N and an integer K, the task is to find if string A can be converted… Read More
Given an array arr[] containing integers. The task is to find the largest positive integer x missing from the array such that min(arr[]) < x… Read More
Given an array arr[]. The task is to count elements in the array that appears only once and it’s consecutive next (arr[i]+1) and prev (arr[I]… Read More
Given an array arr[]. The task is to minimize the number of removals to make all the elements in arr[] consecutive.  Examples Input: arr[] =… Read More
Given an array arr[] of size N. The task is to find the number of sequences in which any one of the following conditions is… Read More
Given an integer array arr[] of size N and a positive integer K, the task is to count all the pairs in the array with… Read More
Given a binary string str. The task is to find the size of the set(contains unique substrings) of substrings such that if there is a… Read More
Given a N x N matrix, such that the element at the index [N/2, N/2] is missing, the task is to find the maximum integer… Read More
Given an array arr[], the task is to find the number of times the current integer has already occurred during array traversal.  Examples: Input: arr[]… Read More
Given an array arr[] of N integers and an array query[] having Q integers, the task is to print the array arr[] after moving the… Read More
Given an array arr[], of size N the task is to find the minimum operations on the array such that in each operation any element… Read More
Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples :   Input : arr[] = { 2, 6,… Read More

Start Your Coding Journey Now!