Katkat

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 1201–1230 of 3276 results

  • GoogleMediumSoftware Engineer
    Find the Time for Grid Signals to Reach Every Target

    Implement a multi-source breadth-first search to find the minimum time needed for signals emitted from multiple sources to reach all target cells on a grid with obstacles.

    Coding & AlgorithmsOnsiteBFSMulti-Source BFSGrid
  • GoogleMediumSoftware Engineer
    Find the nearest common manager of K employees in a reporting tree

    Given a company reporting tree in which every employee except the top one has a single direct manager, find the nearest manager shared by a list of K employees, counting each employee as part of their own chain. Tests tree reasoning, ancestor chains and very deep hierarchies.

    Coding & AlgorithmsOnsite
  • GoogleMediumSoftware Engineer
    Find top-k distinct elements

    This question tests the ability to combine frequency counting with heap-based selection to extract the k most frequent distinct elements from an input stream.

    Coding & AlgorithmsOnsiteHash TableHeapSorting
  • GoogleMediumSoftware Engineer
    Find where to cut cake into equal areas

    This problem tests your ability to model a geometric area as a function and solve for a specific threshold using a binary search or linear sweep approach.

    Coding & AlgorithmsTechnical ScreenGeometryArraysPrefix Sums
  • GoogleMediumSoftware Engineer
    Generate Every Ordered Sum Using Ones and Twos

    Tests backtracking and recursion to generate all valid ordered compositions of a target integer using only digits 1 and 2 in lexicographical order.

    Coding & AlgorithmsOnsiteRecursionBacktrackingCombinatorics
  • GoogleMediumSoftware Engineer
    Grid Reachability From Start to Target With Impassable Water Cells

    Decide whether a start cell can reach a target cell in a square grid when some cells are water and moves are limited to up, down, left and right. It tests modeling a grid as a graph, choosing a traversal, and handling walled-off regions and grid edges correctly.

    Coding & AlgorithmsOnsite
  • GoogleEasySoftware Engineer
    Implement Batched Undo/Redo Layer

    This question evaluates understanding of state management, undo/redo semantics, batched transactional edits, and memory-efficient change history representation for map-based document layers.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Implement Checksums and Feature Rollout Evaluation

    This question evaluates string processing, checksum computation with modular indexing, parsing of dependency data, and business-logic evaluation for feature rollouts, including conditional eligibility checks and dependency resolution.

    Coding & AlgorithmsOnline Assessment
  • GoogleHardSoftware Engineer
    Implement Longest-Match Text Replacement

    This question evaluates string processing, pattern matching, greedy algorithm reasoning, and data structure design for efficient longest-prefix token replacement, and is categorized under Coding & Algorithms.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Implement Multi-Player Tic-Tac-Toe

    This problem tests object-oriented design and grid traversal logic by requiring the implementation of a generic N-player Tic-Tac-Toe game where win conditions are evaluated based on a specific run-length.

    Coding & AlgorithmsOnsiteOOPGridGame Design
  • GoogleMediumData Scientist
    Implement Sampling and Minimize Loss in Numerical Coding

    This question evaluates proficiency in probability and numerical methods, focusing on sampling from truncated distributions and analytical properties of estimators under various loss functions.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Implement Trie Insert and Exact-Word Search

    Implement trie insertion and exact-word search for up to a million total characters, distinguishing terminal words from mere prefixes and returning search results in operation order.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Implement a Reusable Locker Allocation System

    Design and implement a locker bank management system that assigns the lowest available locker index, handles invalid store and pickup operations, releases lockers immediately, and tracks the last package successfully stored in each locker.

    Coding & AlgorithmsTechnical Screenheaphash-tabledesign
  • GoogleMediumMachine Learning Engineer
    Implement a Transformer Block with SwiGLU

    This question evaluates implementation and reasoning skills for Transformer internals, testing competency in multi-head self-attention, SwiGLU gated feed-forward layers, residual connections, and layer normalization within the Machine Learning / deep learning domain.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Implement an LRU cache

    This question evaluates competency in data structure design and algorithmic complexity by requiring a bounded key-value cache with O(1) average-time get and put operations.

    Coding & AlgorithmsOnsite
  • GoogleMediumData Scientist
    Implement anagram check and stable deduplication

    This question evaluates streaming algorithm design, Unicode normalization and locale-aware text processing, multiset frequency counting under tight time and memory bounds for an anagram checker, and stable, order-preserving deduplication with custom keys and NaN handling; it is in the Coding & Algorithms domain for a Data Scientist position.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Implement frequency + distance top‑K queries

    This pair of problems evaluates algorithmic and data-structure skills including frequency counting, multi-criteria ordering and selection for top-K results, geometric distance computation for tie-breaking, and time-indexed storage with nearest-timestamp retrieval.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Implement iterator merging lists with filtering

    This problem tests your ability to design a stateful iterator that performs a multi-way merge on sorted streams while applying filtering and deduplication logic on the fly.

    Coding & AlgorithmsTechnical ScreenIteratorsHeapMerge K Sorted
  • GoogleMediumData Scientist
    Implement longest subarray summing to k

    This question evaluates proficiency in array algorithms, prefix-sum reasoning, hash-based lookup patterns, and careful handling of edge cases and deterministic tie-breaking.

    Coding & AlgorithmsOnsite
  • GoogleMediumData Scientist
    Implement percentage RMSE and bootstrap its CI

    This question evaluates implementation and statistical reasoning skills, focusing on robust numerical computation of percentage RMSE (including handling zeros/negatives, optional country weights, and numerical stability) and nonparametric bootstrap methods for confidence intervals.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumData Scientist
    Implement piecewise linear interpolation for time-to-empty

    This question evaluates numerical interpolation, time-series data cleaning, monotonicity preservation, extrapolation, and numerical stability skills applied to battery discharge curves, and falls under coding and algorithms within a data science domain.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumData Scientist
    Implement sampling and subarray scan

    This question evaluates probabilistic sampling and random-number transformation concepts for generating uniform points in a continuous domain, alongside array-processing and algorithmic analysis skills for identifying the longest strictly increasing contiguous subarray.

    Coding & AlgorithmsTechnical Screen
  • GoogleEasyData Scientist
    Implement sampling, subarray scan, and percentile estimate

    This problem tests your ability to generate random uniform points within a geometric shape, process contiguous array properties using linear scans, and perform linear interpolation on histogram data to approximate percentiles.

    Coding & AlgorithmsTechnical ScreenGeometryAlgorithmsStatistics
  • GoogleEasySoftware Engineer
    Implement string formatting and request tracking tasks

    This question tests string manipulation, character mapping logic for rotational symmetry, and the ability to manage time-ordered event tracking using appropriate data structures.

    Coding & AlgorithmsTechnical ScreenStringsTwo PointersHash Maps
  • GoogleMediumMachine Learning Engineer
    Implement substring search and weighted sampling

    This question tests the ability to implement a fast substring matching algorithm and a data structure that supports weighted random sampling from a dynamic collection of items.

    Coding & AlgorithmsTechnical ScreenString MatchingKMPProbability
  • GoogleMediumSoftware Engineer
    Implement text wrapping, waitlist, and intervals

    This problem tests your ability to implement a greedy word-wrapping algorithm and a custom queue data structure that supports efficient deletions based on time intervals.

    Coding & AlgorithmsOnsiteGreedyString ManipulationData Structures
  • GoogleHardSoftware Engineer
    Infection Spread on a Grid (Cellular Automaton)

    Implement an optimized discrete-time cellular automaton simulating epidemic spread on a 2D grid with recovery durations, barriers, and multi-neighbor infection thresholds.

    Coding & AlgorithmsTechnical ScreenBreadth-First SearchSimulationMatrix
  • GoogleMediumSoftware Engineer
    Intervals with Exactly X Concurrent Meetings

    Implement an algorithm to identify all maximal time intervals during which exactly X meetings overlap, using a sweep-line technique over half-open intervals.

    Coding & AlgorithmsOnsitesweep-lineintervalssorting
  • GoogleMediumSoftware Engineer
    Largest-Area Rectangle From a Point Set When Sides Need Not Be Axis-Aligned

    Given distinct integer points in the plane, return the largest area of a rectangle whose four corners are input points, where the rectangle may be rotated rather than aligned with the axes. It tests the geometric characterization of rectangles, grouping point pairs efficiently, and exact integer arithmetic.

    Coding & AlgorithmsOnsite
  • GoogleMediumSoftware Engineer
    Load a Delivery Van With Equal-Size Crates for Maximum Profit

    Pick crates from limited stock to fill a van whose slots can number in the billions, when every crate takes one slot; recognize that the scary-looking bounded knapsack collapses to a greedy, then answer many capacity queries fast.

    Coding & AlgorithmsTechnical Screengreedysortingprefix-sums