## Find an array of size N having exactly K subarrays with sum S

Given three integers N, K and S, the task is to choose an array of size N such that there exists exactly K sub-arrays with… Read More »

- Live Classes for Data Structures and Algorithms: Interview Preparation Focused Course
- Playfair Cipher with Examples
- Count of triplets that satisfy the given equation
- Maximum Sequence Length | Collatz Conjecture
- Implementation of BFS using adjacency matrix
- Find a pair (n,r) in an integer array such that value of nPr is maximum
- Minimum increment or decrement operations required to make the array sorted
- Maximum XOR of Two Numbers in an Array
- Check if the rows of a binary matrix can be made unique by removing a single column
- Longest Increasing Subsequence using Longest Common Subsequence Algorithm
- Color all boxes in line such that every M consecutive boxes are unique
- Count the number of elements which are greater than any of element on right side of an array
- Count all substrings having character K
- Count of triples (A, B, C) where A*C is greater than B*B
- Minimum increment operations to make K elements equal
- Maximise the number of toys that can be purchased with amount K using min Heap
- Number of sub arrays with negative product
- Minimize the cost of partitioning an array into K groups
- Find a pair (n,r) in an integer array such that value of nCr is maximum
- Minimum distance to visit all the nodes of an undirected weighted tree
- Widest Path Problem | Practical application of Dijkstra's Algorithm
- Count the values greater than X in the modified array
- Maximize the Expression | Bit Manipulation
- Maximum non-attacking Knights that can be placed on an N*M Chessboard
- Sum of absolute differences of pairs from the given array that satisfy the given condition
- Expand the string according to the given conditions
- Comparing X^Y and Y^X for very large values of X and Y
- Implementation of DFS using adjacency matrix
- Find all numbers between range L to R such that sum of digit and sum of square of digit is prime
- Minimum number of additons to make the string balanced

Given three integers N, K and S, the task is to choose an array of size N such that there exists exactly K sub-arrays with… Read More »

Given a 2 dimensional array arr[][] consisting of slope(m) and intercept(c) for large number of lines of the form y = mx + c and… Read More »

Given an array arr[] of size N and an integer K, the task is to find the Kth number from the product array. Note: A… Read More »

Given a number N which denotes the number of stairs, the task is to reach the Nth stair by taking 1, 2 steps any number… Read More »

Given a gold bar of length N with N equal markings, the task is to find the minimum number of cuts required to pay the… Read More »

Given an array arr[], the task is to find the sum of the maximum and the minimum prime factor of every number in the given… Read More »

Given an array arr[] and an integer N, the task is to find a number K from the given array such that if all the… Read More »

Given a very large number N (> 150), the task is to check whether this number is Prime, Semi-Prime or Composite. Example: Input: N =… Read More »

Given an array arr[] of distinct integers from 1 to N. The task is to find the minimum number of swaps required to sort the… Read More »

Prerequisite: Huffman Coding, Huffman Decoding Adaptive Huffman Coding is also known as Dynamic Huffman Coding. The implementation is done using Vitter Algorithm. Encoding Adaptive Huffman… Read More »

Prerequisite: Greedy Algorithms | Set 3 (Huffman Coding), priority_queue::push() and priority_queue::pop() in C++ STL Given a char array ch[] and frequency of each characters as… Read More »

Given a string consisting of only lowercase English alphabets. The task is to count the total number of alphabetically smaller characters on the right side… Read More »

Given the system of equations a2 + b = n and a + b2 = m. The task is to find the number of pair… Read More »

Prerequisite: Optimal Storage on Tapes You are given tapes[] of different sizes and records[] of different volumes. The task is to fill the volumes in… Read More »

Given different intervals, the task is to print the maximum number of overlap among these intervals at any time. Examples: Input: v = {{1, 2},… Read More »