Problem solving Interview Questions | Glassdoor

Problem solving Interview Questions

101

interview questions shared by candidates

Problem solving Interview Questions

Sort: RelevancePopular Date

They presented a demo page and asked me to streamline it to make it more interactive and presentable for a user (open to interpretation).

1 Answer

Using JavaScript/jQuery, I created a simple slideToggle() click event on paragraph headers that collapsed them. I also changed the fonts and font weights to be more readable.

Tell me about an experience where you were forced to handle a conflict, and what was the outcome

2 Answers

How many tennis balls are in this room and why?

14 Answers

Most of them were expected. Almost all are problem solving questions. 1. Given a BST with following property find the LCA of two given nodes. Property : All children has information about their parents but the parents do not have information about their children nodes. Constraint - no additional space can be used

15 Answers

You are a parking lot attendant in a lot that has one open spot, and you want to move the cars from their original positions into a new arrangement. Create a program that will print out instructions on how to move the cars most efficiently.

7 Answers

I have a log that consists of more than 100 million lines. Each line is just a data about user login, login time, etc. I want to sort them based on user login, and then if there is a tie based on login time, etc. However, I have limited memory, so don't think of storing all of them in an array. The memory can only hold n data where n is much smaller than 100 millions. You can access the disk though although it is much slower. How will you do it so that it is as efficient as possible?

5 Answers

Please write a function that accepts a floating number and returns its square-root. You may not use built-in square root function from your language. However, basic operators like addition, subtraction, multiplication are allowed. Please take into consideration the floating precision.

3 Answers

One of the software engineers asked me the question about the colored chameleons bonking into each other question. Basically, there are 15 red, 17 green, and 19 blue chameleons on a desert island. Whenever two chameleons of different colors collide, they both become chameleons of the third color. Can it ever be that all the chameleons on the island are the same color?

3 Answers

You have 25 horses, and you want to know which are the top 3 fastest, but you don't have a stopwatch. You can race the horses, but the track is only big enough to fit 5 horses at a time. How do you find the first, second and third fastest horses using the least amount of races possible?

3 Answers

Problem Solving #2 - You have 3 light switches and 1 light bulb controlled by only 1 switch in a room you can't see into. You can flip any or as many switches as you want and can check the room once. The next time you go into the room, you have to know for sure which switch controls the light bulb.

2 Answers
110 of 101 Interview Questions