linkedin Skip to Main Content

Our 2023 “State of Tech Hiring” report is live! Check it out.


Tiny Interview: Python Random List

Coding Challenges

In this tiny interview, the generate_random_list function works as expected, but it’s very slow on large test cases. Can you figure out what’s wrong and fix it without changing its statistical distribution?

Your task for this tiny interview is to improve the generate_random_list function in the sandbox below to run faster than 100ms for both tests.

Want to conduct interviews on this platform?

Check out CoderPad : pick any interview question or create your own, then invite your candidate to a shared live-coding session on an IDE like this one. You even get 2 free interviews per month forever using this registration link!