## Maximize array sum after K negations | Set 1

Given an array of size n and a number k. We must modify array K number of times. Here modify array means in each operation… Read More »

- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Optimal File Merge Patterns
- Find Intersection of all Intervals
- Given count of digits 1, 2, 3, 4, find the maximum sum possible
- Find the maximum possible value of a[i] % a[j] over all pairs of i and j
- Minimum number of pairs required to make two strings same
- Maximum number of candies that can be bought
- Greedy approach vs Dynamic programming
- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
- Minimum elements to be removed such that sum of adjacent elements is always odd
- Minimum operations to make frequency of all characters equal K
- Minimum cuts required to convert a palindromic string to a different palindromic string
- Maximum distance between two unequal elements
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Count common elements in two arrays containing multiples of N and M
- Find the minimum number of steps to reach M from N
- Count all possible N digit numbers that satisfy the given condition
- Maximal Disjoint Intervals
- Find smallest number K such that K % p = 0 and q % K = 0
- Divide a number into two parts
- Count possible moves in the given direction in a grid
- Find the sum of digits of a number at even and odd places
- Create a Sorted Array Using Binary Search
- Find n positive integers that satisfy the given equations
- Minimum LCM and GCD possible among all possible sub-arrays
- Count the pairs of vowels in the given string
- Find the Kth smallest element in the sorted generated array
- Find minimum length sub-array which has given sub-sequence in it
- Maximize the value of the given expression
- Minimum deletions required to make GCD of the array equal to 1

Given an array of size n and a number k. We must modify array K number of times. Here modify array means in each operation… Read More »

Given a set of n jobs where each job i has a deadline di >=1 and profit pi>=0. Only one job can be scheduled at… Read More »

How to find the largest number with given digit sum s and number of digits d? Examples: Input : s = 9, d = 2… Read More »

How to find the smallest number with given digit sum s and number of digits d? Examples : Input : s = 9, d =… Read More »

Given heights of n towers and a value k. We need to either increase or decrease height of every tower by k (only once) where… Read More »

Dijkstra’s shortest path algorithm runs in O(Elog V) time when implemented with adjacency list representation (See C implementation and STL based C++ implementations for details).… Read More »

Given weights and values of n items, we need to put these items in a knapsack of capacity W to get the maximum total value… Read More »

Given n items of different weights and bins each of capacity c, assign each item to a bin such that number of total used bins… Read More »

Given an array of jobs with different time requirements. There are K identical assignees available and we are also given how much time an assignee… Read More »

Recently makemytrip visited our Campus and I got selected in recruitment drive.The placement drive consisted of 4 rounds. Round1: MCQ and coding round It was… Read More »

Given a value V, if we want to make change for V Rs, and we have infinite supply of each of the denominations in Indian… Read More »

Given a set of n strings arr[], find the smallest string that contains each string in the given set as substring. We may assume that… Read More »

We have discussed following topics on Minimum Spanning Tree. Applications of Minimum Spanning Tree Problem Kruskal’s Minimum Spanning Tree Algorithm Prim’s Minimum Spanning Tree Algorithm… Read More »

Given an array and a number ‘x’, write a function to delete ‘x’ from the given array. Example: Input: arr[] = {3, 1, 2, 5,… Read More »

Given a universe U of n elements, a collection of subsets of U say S = {S1, S2…,Sm} where every subset Si has an associated… Read More »