Engineering Management Trainee Interview Questions

56,448 engineering management trainee interview questions shared by candidates

Given a function rand() that returns 0 in probability of 0.5 and 1 in 0.5, write a function that generates a number between 0 - n-1 in uniform distribution. that is, for every x in {0,...,n-1} , P(random() == x) = 1/n.
avatar

Firmware Engineering

Interviewed at Intel Corporation

3.9
Apr 1, 2019

Given a function rand() that returns 0 in probability of 0.5 and 1 in 0.5, write a function that generates a number between 0 - n-1 in uniform distribution. that is, for every x in {0,...,n-1} , P(random() == x) = 1/n.

Viewing 2311 - 2320 interview questions

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