Language preparation
Coding interview preparation by programming language
Prepare for coding interviews in ten languages with collection guides, worked algorithms, runtime pitfalls, and linked practice exercises.
Start with the preparation guide for a language you can use comfortably, then practice its collections and implementation details. Each guide links to relevant exercises. A lesson’s editor shows which languages are available for that exercise. Use the study-plan builder to reserve learning and review time.
JavaScript
JavaScript coding interview preparation
Practice the data structures, language behavior, asynchronous utilities, and testing habits that support clear JavaScript interview solutions.
GuidesDebounce vs. throttle in JavaScript
Build both functions, compare leading and trailing calls, and test timing behavior with an interactive event timeline.
GuidesImplement Promise.all in JavaScript
Write a Promise.all implementation that preserves input order, handles empty iterables, and rejects correctly.
GuidesThe JavaScript event loop, explained with execution traces
Trace synchronous code, promise microtasks, timers, and async functions. Work through examples before checking their output.
Interactive toolsDebounce and throttle visualizer
Send events and compare immediate, debounced, and throttled callbacks. Adjust the wait and leading/trailing options and inspect exact timelines.
TopicsJavaScript interview utilities and concepts
Practice promises, closures, array methods, event emitters, debounce, and throttle with guides and coding lessons.
GuidesImplement a JavaScript queue for BFS without repeated shift calls
Build a FIFO queue with bounded compaction, distinguish empty results from undefined values, and use it in a cyclic graph traversal.
Interactive toolsJavaScript output quiz: 12 snippets with explained answers
Predict JavaScript output for closures, this, copies, Map keys, defaults, sorting, and promises. Compare explanations and retry missed snippets.
Worked lesson walkthroughs
Two Sum in JavaScript: return every matching index pair
Solve the all-pairs Two Sum exercise with a JavaScript Map. Trace complement lookups, handle index zero, preserve indexes, and test numeric assumptions.
Lesson walkthroughValid brackets in JavaScript: a stack that ignores ordinary text
Validate nested parentheses, brackets, and braces with a JavaScript array stack. Trace mismatched closers, ignore other characters, and test nesting and empty input.
Lesson walkthroughProduct of array except self in JavaScript without division
Build the product array with prefix and suffix passes in JavaScript. Trace the output in place, handle zeros, avoid fill aliasing mistakes, and explain numeric limits.
TypeScript
TypeScript coding interview preparation
Use precise types for maps, trees, unions, and asynchronous functions while keeping your interview implementation readable and testable.
GuidesTypeScript collections: missing values, keys, and readonly contracts
Model lookup presence explicitly, handle unchecked indexes, preserve zero and undefined, and write a typed frequency counter and graph BFS.
Python
Python coding interview preparation
Choose lists, dictionaries, sets, deque, and heaps deliberately. Practice readable Python solutions with clear time and memory analysis.
ReferencePython collections for interviews: dict, Counter, deque, and heapq
Choose Python collections by operation, write counts and adjacency lists, and test queue, heap, missing-key, and copying behavior.
GuidesCount islands in Python with iterative flood fill
Solve a four-neighbor binary-grid problem with an explicit stack, visited-set and in-place variants, complexity analysis, and boundary tests.
Worked lesson walkthroughs
Two Sum in Python: all index pairs with a dictionary
Use enumerate and a dictionary to return every matching pair of indexes. Follow the invariant, distinguish missing keys from index zero, and test the unique-integer contract.
Lesson walkthroughValid brackets in Python: matching delimiters with a list stack
Write a Python bracket validator using append, pop, and a closer-to-opener dictionary. Follow a nesting trace and test text, missing openers, and crossing brackets.
Lesson walkthroughProduct of array except self in Python: two passes, no division
Solve Product Array using Python lists and running prefix and suffix products. Explain the invariant, zeros, negative numbers, and the cost of large integer arithmetic.
Java
Java coding interview preparation: collections, numbers, and traversal
Prepare with HashMap, ArrayDeque, safe comparators, UTF-16 text, and tested Java implementations of Two Sum and graph traversal.
GuidesJava PriorityQueue: top-K values, comparators, and stable ties
Retain top-K stream values, process jobs with explicit tie order, and test Java heap ranking separately from iteration and sorted output.
Worked lesson walkthroughs
Two Sum in Java: all index pairs with HashMap
Build a Java HashMap solution for every matching index pair. Handle Integer null checks, avoid complement overflow, and convert the result to int[][] with tests.
Lesson walkthroughValid brackets in Java: ArrayDeque and ordered matching
Use ArrayDeque as a stack to validate brackets in Java. Handle pop safely, choose character types, ignore ordinary text, and verify a complete set of edge cases.
Lesson walkthroughProduct of array except self in Java with long arrays
Implement prefix and suffix products with long[] in Java. Initialize the output correctly, handle zeros without division, and state the overflow assumptions with tests.
C++
C++ coding interview preparation: STL, ownership, and boundaries
Use vectors, hash maps, queues, and priority queues while handling iterator invalidation, integer overflow, and safe index boundaries.
GuidesC++ lower_bound and upper_bound: counts, neighbors, and record ranges
Use C++ search boundaries for duplicate counts, strict predecessors and successors, and custom record keys without invalid iterator operations.
Go
Go coding interview preparation: slices, maps, and text
Practice Go slice ownership, map presence checks, byte and rune boundaries, and queue-based graph traversal with worked code.
GuidesLongest unique substring in Go: bytes, runes, and Unicode
Implement rune and ASCII sliding windows, reject invalid input, preserve forward-only boundaries, and test Unicode length assumptions.
Rust
Rust coding interview preparation: borrowing and collections
Write interview algorithms with borrowed slices, explicit Option results, HashMap entries, VecDeque, and min-heap priority through Reverse.
GuidesRust BFS shortest paths with borrowed graph labels
Return a shortest unweighted route using borrowed string labels, a FIFO frontier, explicit parents, and a lifetime that matches the source graph.