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 1081–1110 of 3276 results

  • GleanMediumSoftware Engineer
    Implement 2048 Game Logic

    This question evaluates array and matrix manipulation, stateful simulation of game mechanics, and handling edge cases such as merge constraints, single-merge-per-move rules, and empty-cell management.

    Coding & AlgorithmsTechnical Screen
  • GleanHardSoftware Engineer
    Implement 2048 tilt move

    This question evaluates a candidate's ability to implement array and matrix manipulation, deterministic state-transition logic, and rule-based merging behavior in a grid-based simulation.

    Coding & AlgorithmsTechnical Screen
  • GleanMediumMachine Learning Engineer
    Implement Rate-Limited Wikipedia Crawler

    This question evaluates a candidate's ability to implement a rate-limited web crawler, testing skills in crawl frontier management, prioritization by page-title initial, deduplication, rate limiting, and robust error handling.

    Coding & AlgorithmsOnsite
  • GleanMediumSoftware Engineer
    Implement a Byte Pair Encoding (BPE) Tokenizer

    Implement a Byte Pair Encoding (BPE) tokenizer with training, encoding, and decoding capabilities using frequency-based iterative merging.

    Coding & AlgorithmsTechnical ScreenNLPStringsDesign
  • GleanMediumSoftware Engineer
    Rank Every Cell of a Distinct-Value Matrix Consistently Within Its Row and Column

    Replace every value in a matrix of distinct integers with the smallest rank such that larger values outrank smaller ones within each row and column. Tests processing values in sorted order, tracking per-row and per-column state, and the one-dimensional special case.

    Coding & AlgorithmsOnsite
  • GleanMediumSoftware Engineer
    Restore an Array with One Displaced Element

    Restore a nearly sorted array where at most one element has been removed and reinserted elsewhere, in linear time and without mutating the input array.

    Coding & AlgorithmsTechnical Screenarraystwo-pointerssorting
  • GleanMediumSoftware Engineer
    Return Top Department Suggestions

    Design an in-memory prefix search system that returns the top-k department suggestions based on popularity scores, with deterministic tie-breaking.

    Coding & AlgorithmsTechnical ScreenTrieHeapPrefix Search
  • GleanHardSoftware Engineer
    Search Words in a Character Grid

    This question evaluates algorithmic problem-solving in grid traversal and multi-word string search, targeting competencies in pathfinding, string matching, efficient use of data structures for shared prefixes, and time/space complexity analysis within the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • GleanMediumSoftware Engineer
    Shortest Manhattan Distance Between Any X and Any Y in a String or Grid

    Find the shortest distance between any X and any Y, first in a string and then in a 2D grid using Manhattan distance, returning -1 when one letter is missing. Tests moving from a linear scan to multi-source breadth-first search and reasoning about efficiency on large grids.

    Coding & AlgorithmsOnsite
  • GleanMediumSoftware Engineer
    Simulate Modulo-Assigned Document Indexers with Wrap-Around and Rank the Busiest

    Simulate documents assigned to indexers by index modulo m, falling through to the next free indexer with wrap-around and dropping documents when all are busy, then report processed totals, the busiest indexer and the top-k share. Tests event simulation, finding the next free slot efficiently and precise tie rules.

    Coding & AlgorithmsOnsite
  • GleanHardSoftware Engineer
    Simulate document assignment to indexers

    This question evaluates simulation of parallel worker scheduling, time-based queue processing, modular assignment logic, and aggregation/ranking (top-k and percentage) competencies for tracking per-worker workloads.

    Coding & AlgorithmsTechnical Screen
  • GleanMediumSoftware Engineer
    Sort in Linear Time an Array Where At Most One Element Was Moved Out of Place

    Given an array that was sorted until one element was moved to another position, return it sorted again in linear time without a full sort. Tests locating the displaced element in either direction, handling duplicates and already-sorted input, and reasoning about O(n) time with constant extra space.

    Coding & AlgorithmsOnsite
  • Goldman SachsMediumSoftware Engineer
    Collect the Most Rocks with Upward and Rightward Moves

    Tests dynamic programming on a grid to find an optimal path from the bottom-left to top-right corner using constrained directional moves.

    Coding & AlgorithmsOnsitedynamic-programminggridmatrix
  • Goldman SachsHardMachine Learning Engineer
    Complete decision tree and gradient descent functions

    This question evaluates implementation skills in supervised machine learning and numerical optimization, specifically computing Gini impurity and selecting optimal binary splits for a decision tree alongside deriving and applying a single-step gradient descent update for linear regression.

    Coding & AlgorithmsOnline Assessment
  • Goldman SachsEasyData Scientist
    Count Palindromic Substrings

    This question tests your ability to identify palindromes within a string using expansion around centers or dynamic programming.

    Coding & AlgorithmsOnline AssessmentStringsTwo PointersDynamic Programming
  • Goldman SachsMediumSoftware Engineer
    Count segments and optimize 3-server assignment

    This two-part problem evaluates array-processing and counting competency for identifying fixed-length strictly increasing subarrays and combinatorial partitioning and optimization competency for assigning elements to three groups to maximize a minimal pairwise-difference metric, and is commonly asked to assess efficient algorithm design, correctness under constraints, and the ability to handle large inputs. Belonging to the Coding & Algorithms domain, it tests practical algorithmic application, data-structure-aware implementation and complexity analysis rather than purely theoretical understanding.

    Coding & AlgorithmsOnline Assessment
  • Goldman SachsMediumSoftware Engineer
    Design a Workspace Resource Manager

    This problem tests your ability to design a tree-based hierarchical resource management system and implement efficient operations for path-based access, relocation, and cycle detection.

    Coding & AlgorithmsTechnical ScreenTreesGraphsData Structures
  • Goldman SachsMediumSoftware Engineer
    Find the Root of the Largest Tree in a Child-to-Parent Forest

    Given a list of child-to-parent pairs that form a forest of rooted trees, return the root ID of the tree with the most nodes, breaking size ties by the smallest root ID. Tests building a forest from an edge list, identifying roots, counting tree sizes, and applying a precise tie-break rule.

    Coding & AlgorithmsTechnical Screen
  • Goldman SachsEasySoftware Engineer
    Implement a String Deque

    This question evaluates competence with fundamental data structures and algorithms by requiring an implementation of a string double-ended queue (deque), checking understanding of constant-time (O(1)) operations, manipulation of node links or references, and correct handling of edge cases; category: Coding & Algorithms; level: practical implementation rather than purely conceptual. It is commonly asked to assess the ability to implement low-level data structure mechanics, guarantee performance bounds, and expose attention to correctness and boundary conditions in algorithmic coding tasks.

    Coding & AlgorithmsTechnical Screen
  • Goldman SachsMediumSoftware Engineer
    Maximize Element Frequency with Limited Increments

    Tests sorting and sliding window techniques to maximize an element's frequency within an increment budget.

    Coding & AlgorithmsOnsitearraysliding-windowsorting
  • Goldman SachsMediumQuantitative Researcher
    Minimum-Cost Round Trip Visiting Every City Once with Asymmetric Costs

    Given a complete matrix of possibly asymmetric travel costs between up to 16 cities, return the minimum cost of a round trip that starts at city 0, visits every other city exactly once and returns to city 0. The problem tests exact optimization over subsets of cities within tight limits.

    Coding & AlgorithmsTechnical Screen
  • Goldman SachsMediumSoftware Engineer
    Rolling Ball Maze Reachability

    This problem tests your ability to model a grid-based movement simulation as a graph reachability problem, requiring efficient state traversal.

    Coding & AlgorithmsOnsiteBFSGraphsSimulation
  • Goldman SachsEasySoftware Engineer
    Search for a Target in a Matrix Sorted by Rows and Columns

    Tests the ability to search efficiently in a 2D grid sorted along both dimensions by exploiting boundary invariants to achieve an O(m + n) time complexity.

    Coding & AlgorithmsOnsitearraysmatrixbinary-search
  • Goldman SachsMediumSoftware Engineer
    Solve string and hashmap coding tasks

    This problem tests your ability to manipulate strings, utilize hash maps for grouping data, and perform iterative simulations based on sequential command logs.

    Coding & AlgorithmsTechnical ScreenStringsHashMapsData-Processing
  • Goldman SachsMediumSoftware Engineer
    Solve string and hashmap interview tasks

    This question evaluates proficiency in string manipulation and hash-based aggregation, specifically skills such as frequency counting, map/dictionary usage, and numeric aggregation for averages.

    Coding & AlgorithmsTechnical Screen
  • Goldman SachsMediumQuantitative Researcher
    Total Rainwater Trapped Above an Elevation Profile of Unit-Width Bars

    Given the heights of adjacent unit-width bars in an elevation profile, compute the total amount of rainwater that stays trapped between them after rain, with water spilling off both open ends. The coding problem tests reasoning about the bars that bound each position and handling up to 100,000 bars efficiently.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Add two big integers from digit lists

    This question evaluates algorithmic skills in manipulating linked lists or arrays to perform addition of large integers, focusing on carry propagation, handling differing lengths, and analysis of time and space complexity.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Answer parity-alternation range queries

    This problem tests your ability to use prefix sums or dynamic tracking to determine if a range [L, R] consists of elements that alternate between odd and even parity in O(1) time after O(N) preprocessing.

    Coding & AlgorithmsTechnical ScreenArraysPrefix SumAlgorithms
  • GoogleMediumSoftware Engineer
    Arrange Crops into Connected Regions in Rectangular and Two-Square Gardens

    Arrange exact crop counts into connected grid regions, prove a rectangular construction, and analyze the geometry needed for a two-square garden follow-up.

    Coding & AlgorithmsOnsite
  • GoogleEasySoftware Engineer
    Assign the Minimum Fleet to Rental Reservations

    Determine the minimum fleet size and a deterministic vehicle assignment for a list of rental reservations using interval scheduling and priority queues.

    Coding & AlgorithmsOnsiteGreedyHeapIntervals