Pergunta de entrevista da empresa Booking.com

Implement random function as it's implemented in Java