Ontic Interview Question

1) puzzle : you have random function which gives integer with equal probability you have to modify this so that probability of getting 0 is 75% and getting 1 is 25%.

Interview Answer

Anonymous

Jun 26, 2025

Call the function twice, and if both calls give 1, only then let it send 1 as outcome