Panda Guru LogoPanda
Guru

Need Solution | LinkedIn | Twilio | Microsoft | OA | Maximum Networks

Round 1

Questions: You are given an array speed and speed[i] represents the speed of ith laptop. You are also given a variable minComp which represents minimum laptops in a network and you are also given a variable speedthreshold which represents the minimum speed a network of laptops should have which is calculated by adding the speeds of all laptops in a network. So, you have to maximize the number of networks that can be created and each network having speed at least speedthreshold and having minimum minComp number of laptops.

For example: 1) Input:

speed[] = 2 3 3 4 4 5 6 6 7 7 minComp = 2 speedthreshold = 10

Output: 4

Explanation: Maximum of 4 networks can be formed by combining (3,7), (3,7), (6,4), (5,4,6,2) and all these 4 networks satisfy the given conditions.

Input:

speed[] = 10 9 7 13 12 5 minComp = 2 speedthreshold = 15

Output: 3

Explanation: Maximum of 3 networks can be formed by combining (5,13), (7,12), (10,9) and all these 3 networks satisfy the given conditions.

Constraints: 1 < n < 10^5 1 < minComp < n

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.