## Maximum Subset Sum possible by negating the entire sum after selecting the first Array element

Given an array A[] consisting of N integers, the task is to find the maximum subset sum possible if sum of all the element is… 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
- Maximum profit by buying and selling a share at most K times | Greedy Approach
- Huffman Coding using Priority Queue
- Number of containers that can be filled in the given time
- Find lexicographically smallest string in at most one swaps
- Shortest path in a directed graph by Dijkstra’s algorithm
- Find the Mth element of the Array after K left rotations
- Why Prim’s and Kruskal's MST algorithm fails for Directed Graph?
- Sum of all subarrays of size K
- Count subarrays having sum of elements at even and odd positions equal
- 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
- Queries to check if any non-repeating element exists within range [L, R] of an Array
- Maximum Possible Rating of a Coding Contest
- Frequency of maximum occurring subsequence in given string
- Count of N digit Numbers whose sum of every K consecutive digits is equal
- Lexicographical smallest number after at most K consecutive swaps
- Count number of triangles possible for the given sides range
- Construct an Array of Strings having Longest Common Prefix specified by the given Array
- Proof that traveling salesman problem is NP Hard
- Minimum cost to make an Array a permutation of first N natural numbers
- C++ Program for the Fractional Knapsack Problem
- Maximum sum subarray of size range [L, R]
- Find the maximum sum (a+b) for a given input integer N satisfying the given condition
- Find the largest number smaller than integer N with maximum number of set bits
- Pair of integers with difference K having an element as the K-th multiple of the other

Given an array A[] consisting of N integers, the task is to find the maximum subset sum possible if sum of all the element is… Read More »

Given two arrays A[] and B[] both of size N consisting of distinct elements, the task is to find the minimum cost to swap two… Read More »

Given an integer array arr[] of size N, the task is to construct an array consisting of N+1 strings of length N such that arr[i]… Read More »

Given an array A[], consisting of N elements, the task is to find the minimum number of swaps required such that array elements swapped to… Read More »

Given an array arr[] consisting of N positive integers, the task is to find any permutation of given array such that the product of adjacent… Read More »

Given an array arr[] of N integers, where N > 2, the task is to find the second largest product pair from the given array.… Read More »

Given a Binary array arr[] consisting of N elements, the task is to find the maximum possible length of subarray of only 1’s, after deleting… Read More »

Given an array arr[] of N positive integers, the task is to find the minimum number of operations required of the following types to obtain… Read More »

Given four integers N, M, X and Y, the task is to construct a N * M matrix such that each cell consists of a… Read More »

Given an integer N (? 2), the task is to find the maximum GCD among all pairs possible by the integers in the range [1,… Read More »

Given an N-ary Tree rooted at 1, and an array val[] consisting of weights assigned to every node, and a matrix Q[][], consisting of queries… Read More »

Given a 2D matrix tsp[][], where each row has the array of distances from that indexed city to all the other cities and -1 denotes… Read More »

Given an array A[] consisting of N distinct integers, the task is to rearrange the given array such that the sum of every same-indexed non-empty… Read More »

Given an array arr[] consisting of N integers, the task is to find the maximum count of decreasing subsequences possible from an array which satisfies… Read More »

Given an array arr[] consisting of N integers, the task is to find the array K[] of minimum possible length such that after performing multiple… Read More »