Skip to content
GeeksSmith
Live In-Browser Coding Challenges

Frontend Machine Coding Practice

Practice the exact utility and algorithm challenges asked in Round 1 & 2 at top tech companies. Run live unit test suites in the browser, measure runtime execution, and master Lead-level trade-off explanations.

medium 15 min

Implement Debounce with Immediate & Cancel Support

Implement a `debounce(fn, delay, options)` function that delays invoking `fn` until after `delay` milliseconds have elapsed since the last time the debounced function was invoked. It must preserve `this` and arguments, and provide a `.cancel()` method.

2 Unit TestsSolve Challenge
hard 20 min

Implement Deep Clone with Circular Reference Handling

Write a `deepClone(obj)` function that creates a deep duplicate of nested objects, arrays, Dates, and RegExp instances while handling circular references safely without infinite recursion.

3 Unit TestsSolve Challenge
medium 15 min

Implement Promise.all Polyfill

Implement `promiseAll(iterable)` which returns a Promise that resolves when all input promises have resolved (preserving input order) or rejects as soon as the first promise rejects.

2 Unit TestsSolve Challenge
easy 10 min

Implement Array.prototype.flat with Depth Parameter

Implement a function `flatten(arr, depth = 1)` that flattens nested arrays recursively up to the specified depth limit without using native `Array.prototype.flat()`.

2 Unit TestsSolve Challenge
hard 20 min

Implement LRU (Least Recently Used) Cache

Design and implement a data structure for Least Recently Used (LRU) Cache supporting `get(key)` and `put(key, value)` in O(1) time complexity.

1 Unit TestsSolve Challenge
medium 15 min

Implement Custom EventEmitter (Pub/Sub Pattern)

Implement a custom `EventEmitter` class supporting `on(event, listener)`, `off(event, listener)`, `emit(event, ...args)`, and `once(event, listener)`. Ensure unsubscribing works reliably and listeners do not leak.

2 Unit TestsSolve Challenge
hard 20 min

Implement Async Scheduler with Max Concurrency

Implement a `TaskScheduler(concurrency)` class with an `add(task)` method where `task` is a function returning a Promise. The scheduler must ensure that at most `concurrency` tasks execute concurrently. When a task completes, the next queued task must begin immediately.

2 Unit TestsSolve Challenge
medium 15 min

Find Top K Frequent Elements in an Array (Hash Map + Bucket Sort)

Given an integer array `nums` and an integer `k`, return the `k` most frequent elements in O(N) time complexity. You may return the answer in any order.

3 Unit TestsSolve Challenge
hard 25 min

Implement Custom Promise Polyfill (Promises/A+ Microtask Chaining)

Implement a custom `MyPromise` class from scratch supporting constructor executor, `.then()`, `.catch()`, chaining, and asynchronous microtask execution.

2 Unit TestsSolve Challenge