Consider a pipe of length L. The pipe has N water droplets at N different positions within it. Each water droplet is moving towards the end of the pipe(x=L) at different rates.
When a water droplet mixes with another water droplet, it assumes the speed of the water droplet it is mixing with. Determine the no of droplets that come out of the end of the pipe.
- I gave him a brute force type approach by starting from the second drop and comparing it with the previous one and after checking the condition of speed and time if they can mix or not. Similarly, thi...read more
CN hint:
A drop will mix with another drop if two conditions are met:
- If the drop is faster than the drop it is mixing with
- If the position of the faster drop is behind the slower drop. Also more ...read more
We can solve this problem by calculating the time required by each drop to reach the end of the pipe and comparing them based on their position in the pipe and the time requir...read more
Top SPRINKLR Software Developer Intern interview questions & answers
Popular interview questions of Software Developer Intern
Reviews
Interviews
Salaries
Users/Month