Engineering Management Trainee Interview Questions

56,448 engineering management trainee interview questions shared by candidates

Imagine items are moving on a conveyor belt. When the conveyor starts, you have no way of knowing how many items will arrive (it could be 1 or it could be 1 million). For quality control purposes, you need to select one item from this conveyor at random SUCH THAT every item has an equal probability of being selected. Devise an algorithm that takes a list of unknown length and selects such a random item without counting the length of the list.
avatar

Software Engineering Intern

Interviewed at Blend

2.5
May 9, 2022

Imagine items are moving on a conveyor belt. When the conveyor starts, you have no way of knowing how many items will arrive (it could be 1 or it could be 1 million). For quality control purposes, you need to select one item from this conveyor at random SUCH THAT every item has an equal probability of being selected. Devise an algorithm that takes a list of unknown length and selects such a random item without counting the length of the list.

Viewing 2101 - 2110 interview questions

Glassdoor has 56,448 interview questions and reports from Engineering management trainee interviews. Prepare for your interview. Get hired. Love your job.