## Maximize Profit by trading stocks based on given rate per day

Given an array arr[] of N positive integers which denotes the cost of selling and buying a stock on each of the N days. The… Read More »

- Sliding Window Maximum : Set 2
- Basic Algorithm Techniques Not Taught in Academics
- Find intersection point of two Linked Lists without finding the length
- Length of the smallest substring which contains all vowels
- Length of the Smallest Subarray that must be removed in order to Maximise the GCD
- Find intersection of intervals given by two lists
- Largest value of x such that ax
^{x}is N-digit number of base b - Find four elements that sum to a given value | Two-Pointer approach
- Count of distinct colors in a subtree of a Colored Tree with given min frequency for Q queries
- Minimum length subarray containing all unique elements after Q operations
- Count of subsets having sum of min and max element less than K
- Arrange numbers to form a valid sequence
- Reduce the array such that each element appears at most 2 times
- Count of substrings whose Decimal equivalent is greater than or equal to K
- Find the resultant String after replacing X with Y and removing Z

Given an array arr[] of N positive integers which denotes the cost of selling and buying a stock on each of the N days. The… Read More »

Given string str, the task is to check if characters at the odd indexes of str form a palindrome string or not. If not then… Read More »

Given an array arr[] of length N with unique elements, the task is to find the length of the longest increasing subsequence that can be… Read More »

Given a N-ary tree with some colour associated with every node and Q queries. Each query contains two integers A and X. The task is… Read More »

Given two 2-D arrays which represent intervals. Each 2-D array represents a list of intervals. Each list of intervals is disjoint and sorted in increasing… Read More »

Given an integer array arr[] and an integer K, the task is to find the number of non-empty subsets S such that min(S) + max(S)… Read More »

Given a string str consisting of only lowercase English alphabets, the task is to find the substring of smallest length which contains all the vowels.… Read More »

We generally study most of the algorithmic techniques in academics like Searching, Sorting, Dynamic Programming, Greedy Algorithms, Divide and Conquer, Backtracking, etc. But below techniques… Read More »

Given the integers a, b, N, the task is to find the largest number x such that is an N-digit number of base b. Examples:… Read More »

Given an array of size N containing all elements as 0 initially, and a Q queries containing range in the form of [L, R]. The… Read More »

Given an array arr[] of N elements, the task is to find the length of the smallest subarray such that when this subarray is removed… Read More »

Set 1: Sliding Window Maximum (Maximum of all subarrays of size k). Given an array arr of size N and an integer K, the task… Read More »

Given an array arr of integers of size N and a target number, the task is to find all unique quadruplets in it, whose sum… Read More »

Given a sorted array arr of size N, the task is to reduce the array such that each element can appear at most two times.… Read More »