Sr Software Engineer Interview Questions

67,372 sr software engineer interview questions shared by candidates

You have some sticks with positive integer lengths. You can connect any two sticks of length x and y by paying a cost of x+y. You perform this action until there is one stick remaining. Return the minimum cost of connecting all the given sticks into one stick. Input: 5 2 8 1
avatar

Senior Software Engineer

Interviewed at Google

4.4
Aug 27, 2020

You have some sticks with positive integer lengths. You can connect any two sticks of length x and y by paying a cost of x+y. You perform this action until there is one stick remaining. Return the minimum cost of connecting all the given sticks into one stick. Input: 5 2 8 1

Viewing 2081 - 2090 interview questions

Glassdoor has 67,372 interview questions and reports from Sr software engineer interviews. Prepare for your interview. Get hired. Love your job.