practice a little every day, paws crossed ♡
Coding & Algorithms Interview Questions
Practice 9403 coding, system design and machine learning questions from 546 companies, sorted by role, topic and interview round. Every question has step-by-step hints, a code runner that supports 8 languages and an AI mentor; members also get the full solution walkthrough.
- 9403
- Questions
- 546
- Companies
- 11
- Topics
- 8
- Languages
Showing 421–450 of 1080 results
- GoogleMediumSoftware EngineerMaximize coins collected by 3-step pieces
This question evaluates modeling and optimization of discrete state-space transitions under movement constraints, testing combinatorial reasoning, reachability, and resource-maximization competencies.
Coding & AlgorithmsOnsite - GoogleMediumSoftware EngineerMaximize the Equal Wood Segment Length
Tests the ability to solve an optimization problem by applying binary search over a monotonic search space (binary search on answer).
Coding & AlgorithmsOnsitebinary-searcharraysgreedy - GoogleHardSoftware EngineerMerge Two Named Trees: First Tree's Names and Order, Second Tree's Values
Merge two trees whose nodes carry a name, an integer value and an ordered list of children, keeping the first tree's names and child order while taking values from the second. Same-name children pair up by order of appearance and second-tree leftovers are appended, testing careful recursive construction from a rule-heavy specification.
Coding & AlgorithmsOnsite - GoogleMediumSoftware EngineerMinimize Direction Violations in a Directed Road Network
Find the minimum number of edge reversals needed to travel from a source node to a target node in a directed graph. Tests graph modeling (0-1 weighted edges), edge cases like parallel edges and disconnected components, and efficient shortest-path traversal.
Coding & AlgorithmsOnsiteGraphBFSShortest Path - GoogleMediumSoftware EngineerMinimum Cars for Rental Requests
Determine the minimum number of rental cars required to service a given list of booking requests with half-open time intervals.
Coding & AlgorithmsOnsiteintervalsheapgreedy - GoogleMediumSoftware EngineerMinimum Path Node Count with an Optional Broken Vertex
Find the minimum number of vertices on a path between two nodes in an unweighted graph while avoiding a designated broken vertex.
Coding & AlgorithmsOnsitegraphbfsshortest-path - GoogleMediumSoftware EngineerMost Active Users in a Live Communication Stream
This problem tests your ability to efficiently manage and rank real-time event counts using hash maps and balanced data structures or heaps, focusing on deduplication and stream processing.
Coding & AlgorithmsOnsiteHash MapsStream ProcessingData Structures - GoogleMediumSoftware EngineerOptimize 0/1 to bounded knapsack DP
This question evaluates mastery of dynamic programming for knapsack problems, focusing on state formulation, space-time optimization, and reconstructing optimal item sets.
Coding & AlgorithmsOnsite - GoogleMediumSoftware EngineerParse a Nested-List String and Compute Its Weighted Sum
Implement a parser that processes a string representation of a nested list and computes the depth-weighted sum of all non-negative integers contained within it.
Coding & AlgorithmsOnsiteString ParsingStackSimulation - GoogleMediumSoftware EngineerParse strings and find meeting slots
This question evaluates string parsing and data-extraction skills alongside set/array-based aggregation and algorithmic reasoning for calendar availability and time-window constraints.
Coding & AlgorithmsOnsite - GoogleMediumSoftware EngineerPredict the Most Frequent Next Word in Constant Time
Design and implement a next-word prediction class that builds transition frequencies from adjacent words in sequences and returns the most likely successor for a given word in average constant time.
Coding & AlgorithmsOnsiteHash TableDesignString - GoogleMediumSoftware EngineerReturn Unique Three-Sum Value Triples
Return all unique value triples that reach a target using three distinct input positions, with canonical ordering despite duplicate values. Candidates are evaluated on duplicate control, overflow-safe sums, nonmutation, output-sensitive complexity, and careful boundary cases.
Coding & AlgorithmsOnsite - GoogleMediumSoftware EngineerReturn Words Matching a Typed Prefix
Practice a Google coding interview problem focused on return words matching a typed prefix. The prompt emphasizes edge cases, clean implementation, and verifiable test behavior without revealing the solution.
Coding & AlgorithmsOnsite - GoogleMediumSoftware EngineerReturn all binary search tree keys inside an inclusive range
Given a binary search tree in level-order form and an inclusive range of values, return every key in the tree that falls inside the range, in ascending order. Tests use of the search tree ordering, unbalanced trees, empty results and inclusive boundary handling.
Coding & AlgorithmsOnsite - GoogleMediumSoftware EngineerReturn the Lexicographically Smallest Two-Sum Index Pair
Find the lexicographically smallest pair of distinct indices whose array values sum to a target. Success depends on deterministic tie handling, duplicates, missing-result behavior, nonmutation, hash-based performance, and comparison with sorting-based alternatives.
Coding & AlgorithmsOnsite - GoogleMediumSoftware EngineerSchedule Priority Jobs with Cooldowns
Design a recurring job scheduler that selects the highest-priority eligible job and enforces cooldown periods measured by subsequent retrieval invocations.
Coding & AlgorithmsOnsiteheapdesignpriority-queue - GoogleMediumSoftware EngineerSearch a Pattern Across the Leaf Text of a Binary Tree
Tests binary tree traversal combined with streaming pattern matching (such as the Knuth-Morris-Pratt algorithm) to detect substrings across leaf boundaries without buffering the entire text in memory.
Coding & AlgorithmsOnsitebinary-treestring-matchingkmp - GoogleMediumData ScientistSimulate Coin Flips to Determine Fairness via Empirical Distribution
This question evaluates a candidate's ability to perform simulation-based hypothesis testing by implementing Monte Carlo sampling and computing an empirical two-sided p-value from observed coin-flip counts, emphasizing statistical computation and numerical accuracy.
Coding & AlgorithmsOnsite - GoogleMediumData ScientistSimulate Uniform(0,1) from random bits
This Coding & Algorithms question for a Data Scientist evaluates understanding of randomized algorithms, bit-level representation of real numbers, and probabilistic error and time-complexity analysis, situated at an algorithmic and mathematical abstraction level that requires both conceptual design and quantitative reasoning.
Coding & AlgorithmsOnsite - GoogleMediumSoftware EngineerSimulate meeting-room bookings and return busiest room
This problem tests your ability to manage interval-based resource allocation using a priority queue and a frequency map to track usage statistics.
Coding & AlgorithmsOnsiteHeapSimulationGreedy - GoogleMediumSoftware EngineerSolve Flower Placement and Directory Deletion
Implement algorithms for two interview tasks: minimal directory deletion in a hierarchical filesystem using tree traversal, and valid flower placement on a grid using constraint satisfaction.
Coding & AlgorithmsOnsiteTrieTreeBacktracking - GoogleMediumSoftware EngineerSolve Quickselect, Tree Distance, and Prefix Substrings
This multi-part question evaluates algorithmic problem-solving across selection algorithms, graph/tree traversal, and string processing, testing competencies such as Quickselect behavior and pivot reasoning, computation of node distances in a tree, and prefix-based substring counting.
Coding & AlgorithmsOnsite - GoogleMediumSoftware EngineerSolve Shortest Paths and Rental Allocation
This problem tests your ability to combine graph traversal (Dijkstra's) with greedy interval scheduling to optimize fleet distribution across multiple locations.
Coding & AlgorithmsOnsiteGraphsDijkstraGreedy - GoogleMediumSoftware EngineerSolve Three Array and Matrix Path Problems
Tests multi-paradigm algorithmic fluency across dynamic programming with auxiliary states, greedy interval coverage, and monotonic deque optimization for bounded subarrays.
Coding & AlgorithmsOnsiteDynamic ProgrammingGreedyMonotonic Deque - GoogleMediumSoftware EngineerSolve Two Coding Interview Problems
This question evaluates proficiency in parsing and expression evaluation, recursion/stack management, and string-processing for nested function-style arithmetic, alongside graph modeling, geometric distance reasoning, and traversal algorithms for the bomb chain-reaction scenario; the category is Coding & Algorithms.
Coding & AlgorithmsOnsite - GoogleMediumSoftware EngineerSolve graph and linked list tasks
This problem tests your ability to model complex system dependencies as a directed graph and determine the minimum time to complete a set of tasks given sequential constraints.
Coding & AlgorithmsOnsiteGraphTopological SortDynamic Programming - GoogleMediumSoftware EngineerSolve meeting-room scheduling and shortest paths
This problem tests your ability to manage overlapping intervals using a priority queue and calculate the shortest path in a DAG representing dependencies.
Coding & AlgorithmsOnsiteSortingPriority QueueGraph - GoogleHardSoftware EngineerSolve order-statistics and XOR-triplet problems
This problem tests your ability to use Fenwick trees for order statistics and the properties of prefix XORs to solve counting problems efficiently.
Coding & AlgorithmsOnsiteFenwick TreeBit ManipulationPrefix Sum - GoogleHardMachine Learning EngineerSolve several streaming, DAG, and DP tasks
Implement an ML pipeline optimization engine that calculates critical path latency and peak parallelism for a task DAG, and optimizes streaming checkpoint placement under sliding-window constraints using dynamic programming.
Coding & AlgorithmsOnsiteDAGDynamic ProgrammingSliding Window - GoogleMediumSoftware EngineerSolve three coding interview problems
This set tests proficiency in recursive string decoding, dynamic programming for sequential decision-making, and graph-based traversal algorithms for grid analysis.
Coding & AlgorithmsOnsiteRecursionDynamic ProgrammingGraph Traversal