Engineering Technology Interview Questions

34,010 engineering technology 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 2001 - 2010 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 34,010 interview questions and reports from Engineering technology interviews. Prepare for your interview. Get hired. Love your job.