Uber · Frontend Engineer
Rounds
- Online coding test (screening): 2 questions, pretty simple.
- DS/Algo round: Find the next largest palindrome, given a number.
- Async JS round: Given a faulty setTimeout implementation:
let actualSetTimeout = setTimeout;
let timer;
setTimeout = function(callback, timer) => {
clearTimer(timer);
actualSetTimeout(callback, timer);
}
Using this faulty setTimeout, implement the actual setTimeout.
Questions asked
- Find the next largest palindrome, given a number.
- Using a faulty setTimeout, implement the actual setTimeout.
Tips
- I wasn’t familiar with the async JS question and ended up bombing it, but it was a good experience in asynchronous JS programming.
- If you get async/timer questions, practice with timer polyfills and edge cases like multiple calls and clearing timers.
