Software Developer 4 Interview Questions

96,240 software developer 4 interview questions shared by candidates

The questions were given a time frame of 1 hour in total and were as follows: (30 marks)User inputs N trucks and M coins in the first line. Then the user input price and ID of trucks separated by space in next N lines. Display the ID of the max trucks the user can buy using his coins. If 2 trucks have same price, the user will buy the one with bigger ID. Sample input: 4 5 5 3 4 2 3 4 2 5 The user has inputted that there are 4 trucks to buy from and he has 5 coins. Then the truck with ID 3 has price 5, truck with ID 2 has price 4, truck with ID 4 has price 3, truck with ID 5 has price 2. Expected output: 4 5 Explanation: The truck with ID 4 has price 3 coins and truck with ID 5 has 2 coins, every other bus combination gets him lesser trucks so he can buy a max of 2 trucks of ID 4, 5 totalling 5 coins.
avatar

Software Developer

Interviewed at BlackBuck

3.3
Dec 16, 2017

The questions were given a time frame of 1 hour in total and were as follows: (30 marks)User inputs N trucks and M coins in the first line. Then the user input price and ID of trucks separated by space in next N lines. Display the ID of the max trucks the user can buy using his coins. If 2 trucks have same price, the user will buy the one with bigger ID. Sample input: 4 5 5 3 4 2 3 4 2 5 The user has inputted that there are 4 trucks to buy from and he has 5 coins. Then the truck with ID 3 has price 5, truck with ID 2 has price 4, truck with ID 4 has price 3, truck with ID 5 has price 2. Expected output: 4 5 Explanation: The truck with ID 4 has price 3 coins and truck with ID 5 has 2 coins, every other bus combination gets him lesser trucks so he can buy a max of 2 trucks of ID 4, 5 totalling 5 coins.

Viewing 901 - 910 interview questions

Glassdoor has 96,240 interview questions and reports from Software developer 4 interviews. Prepare for your interview. Get hired. Love your job.