## Minimum number of changes such that elements are first Negative and then Positive

Given an array arr[] of size N. The task is to find the minimum number of changes required to convert the array such that for… Read More »

- Minimize the maximum difference between adjacent elements in an array
- Number of pairs in an array with the sum greater than 0
- Minimum salary hike for each employee such that no employee feels unfair
- Extended Knapsack Problem
- Huffman Coding using Priority Queue
- Maximum profit by buying and selling a share at most K times | Greedy Approach
- Find lexicographically smallest string in at most one swaps
- Why Prim’s and Kruskal's MST algorithm fails for Directed Graph?
- Shortest path in a directed graph by Dijkstra’s algorithm
- Find the Mth element of the Array after K left rotations
- Sum of all subarrays of size K
- Count subarrays having sum of elements at even and odd positions equal
- Number of containers that can be filled in the given time
- Maximum size of square such that all submatrices of that size have sum less than K
- Longest increasing sub-sequence formed by concatenating array to itself N times
- Count the elements having frequency equals to its value
- Maximum Possible Rating of a Coding Contest
- Minimum cost to make an Array a permutation of first N natural numbers
- Count number of triangles possible for the given sides range
- Find the maximum sum (a+b) for a given input integer N satisfying the given condition
- Queries to check if any non-repeating element exists within range [L, R] of an Array
- Count of N digit Numbers whose sum of every K consecutive digits is equal
- Proof that traveling salesman problem is NP Hard
- Lexicographical smallest number after at most K consecutive swaps
- Find the largest number smaller than integer N with maximum number of set bits
- Length of the Smallest Subarray that must be removed in order to Maximise the GCD
- Find subarray of Length K with Maximum Peak
- C++ Program for the Fractional Knapsack Problem
- Maximum sum subarray of size range [L, R]
- Minimum number of colors required to color a Circular Array

Given an array arr[] of size N. The task is to find the minimum number of changes required to convert the array such that for… Read More »

Given two unsorted arrays arr1[] and arr2[]. Find the sum of elements from arr1[] whose difference with the mean of arr2[] is < k. Examples:… Read More »

Given three integers N, X and Y. The task is to find N positive integers that satisfy the given equations. a12 + a22 + ….… Read More »

Given two integers N and M. The task is to find the minimum number of steps to reach M from N by performing given operations.… Read More »

Given an integers X. The task is to find the number of jumps to reach a point X in the number line starting from zero.… Read More »

Given an array arr[] of size n where arr[i] is the amount of candies of type i. You have unlimited amount of money. The task… Read More »

Given an array arr[] of n integers and an integer k. The task is to maximize the sum of the array after performing the given… Read More »

Given an undirected unweighted connected graph consisting of n vertices and m edges. The task is to find any spanning tree of this graph such… Read More »

Given a set of N intervals, the task is to find the maximal set of mutually disjoint intervals. Two intervals [i, j] & [k, l]… Read More »

Given the count of digits 1, 2, 3, 4. Using these digits you are allowed to only form numbers 234 and 12. The task is… Read More »

Given an array of positive and negative elements. The task is to replace every i-th element of the array by the absolute difference of absolute… Read More »

Given n number of sorted files, the task is to find the minimum computations done to reach Optimal Merge Pattern. When two or more sorted… Read More »

Given three non-zero integers a, b and c. The task is to find the maximum value possible by putting addition and multiplication signs between them… Read More »

Given palindromic string s, the task is to find minimum k, such that you can cut this string into k+1 parts, and then unite them… Read More »

Given a binary string str. In a single operation, we can change any ‘1’ to ‘0’ or any ‘0’ to ‘1’. The task is to… Read More »