Category Archives: Greedy

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 a change for V Rs, and we have an infinite supply of each of the denominations… 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. We assume that array maintains two things with… 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
Given n cities and distances between every pair of cities, select k cities to place warehouses (or ATMs or Cloud Server) such that the maximum… Read More
Every positive fraction can be represented as sum of unique unit fractions. A fraction is unit fraction if numerator is 1 and denominator is a… Read More
Given a number of friends who have to give or take some amount of money from one another. Design an algorithm by which the total… Read More
  Given an array of jobs where every job has a deadline and associated profit if the job is finished before the deadline. It is… Read More
Given arrival and departure times of all trains that reach a railway station, the task is to find the minimum number of platforms required for… Read More
MakeMyTrip recently visited our campus.Below is my interview experience: Round 1: (Online MCQs) Section A- There were 20 Aptitude and Logical Reasoning questions which has… Read More
There are given n ropes of different lengths, we need to connect these ropes into one rope. The cost to connect two ropes is equal… Read More
Given a string and a positive integer d. Some characters may be repeated in the given string. Rearrange characters of the given string such that… Read More