Software Engineer Sr Interview Questions

71,743 software engineer sr 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 2231 - 2240 interview questions

Glassdoor has 71,743 interview questions and reports from Software engineer sr interviews. Prepare for your interview. Get hired. Love your job.