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
Software Senior Interview Questions
75,733 software senior interview questions shared by candidates
Onsite: 1. How would you go about designing MTBA network (Rail and Road network)? Followup: How would keep track of user activities.
Twitter Design
Easy algorithm questions, easy system design question.
Leetcode for technical rounds should be enough. For design definitely concentrate on DB. They go into a lot of details.
What is your favorite Google product?
Nothing was too difficult, but the process is bad because they won't tell you why they won't continue with you.
DSA - Scenaria based, priority quesue was to be used with creating classes
What is your expected salary?
Imagine you are given 10,000 files each containing 1 Million integers. I would you sum all of them and give the final result? ---> Interviewer wanted to test scalability, distributed concepts. He has written the basic code and wanted to improve upon that. Here's the basic code. public getSum(String[] file_names) { int sum = 0; for(String f: file_names) { sum = sum + sumOfFile(f); } return sum; } Questions: What's wrong with above code? Ans: Integer overflow How would you implement sumOfFile? What if 'sumOfFile' takes lot of time to finish computing? How do you fasten the program?
Viewing 2361 - 2370 interview questions