MakeMyTrip

Details

Job Status

6 Months Internship + PPO

Criteria

StudyCutoff
X%
XII%
UG7 GPA

Round 1

16/09/23

There were 17 Questions to be solved in 1.5 hours

  1. MCQ (15)
  2. Coding (2)

Coding Questions

  1. Telephone Lines: There are M houses and N localities, your job as a city planner is to design a plan such that atleast one house exists in a locality.

    In a locality, all the houses have a telephone line connected to each other (n*(n-1)/2). Generate two plans to find out the maximum and minimum number of telephone lines that will be required across all the localities.

Max would be generated when all localities except one has 1 house, and the rest in the last locality. The min would be when the houses are equally distributed across all localities.


  1. New Neighbours: There are M houses built in a row and there are N people wanting to move into the houses. (N <= M). Everyone wants to stay as far away as possible from each other, what would be the maximised minimum distance between the houses.

    An array of size M is provided which has the distances from the front gate. Assign the N people to the houses such that they are as far away as possible from each other.

Perform a binary search to determine the distance between the houses and keep updating the minimum distance.