Coding Problem Repository
Solve industry-tested coding challenges, practice algorithm patterns, and level up your developer rank with instant XP rewards.
Implement Debounce Function
Available challenges
Foundational DSA
Interview Core
Complex Optimization
Competitive Elite
Two Sum
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order.
Valid Parentheses
Given a string s containing just the characters "(", ")", "{", "}", "[" and "]", determine if the input string is valid. An input string is valid if: 1. Open brackets must be closed by the same type of brackets. 2. Open brackets must be closed in the correct order. 3. Every close bracket has a corresponding open bracket of the same type.
Merge Two Sorted Lists
You are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list.
Maximum Subarray (Kadane)
Given an integer array nums, find the subarray with the largest sum, and return its sum.
Binary Tree Level Order Traversal
Given the root of a binary tree, return the level order traversal of its nodes values (i.e. from left to right, level by level).
Implement Debounce Function
Implement a debounce function in JavaScript/TypeScript that limits the rate at which a function can fire. The debounced function should delay invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked.
Design Scalable Rate Limiter
Design a distributed rate limiter that handles 50,000 requests/sec with Token Bucket or Sliding Window Log algorithms in Redis. Specify data structures, failure modes, race condition mitigations, and latency trade-offs.
LRU Cache Implementation
Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement the LRUCache class with get and put methods. Both operations must run in O(1) time complexity.
Median of Two Sorted Arrays
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
Custom Promise.allSettled Polyfill
Implement a polyfill for Promise.allSettled without using the native Promise.allSettled implementation. Ensure all settled promises are correctly categorized with status and value/reason.
Implement Debounce Function
Build a resilient rate limiter in TypeScript with closure timer states. Essential for frontend performance.
Your Practice Progress
Bi-Weekly Speed Contest #42
4 algorithmic challenges in 90 minutes. Win XP boosts, badges, and leaderboard glory.