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 631–660 of 1706 results

  • GoogleMediumSoftware Engineer
    Maximum Value from Unit-Weight Items with Limited Copies Under a Capacity

    Find the maximum total value that fits in a bag whose capacity can reach one billion units, when every item weighs one unit and each item type has a value and a limited number of identical copies. Tests judging which knapsack techniques scale to huge capacities and copy counts, plus 64-bit arithmetic for large totals.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Min deletions to avoid overlap in first k

    This problem tests your ability to identify and remove the minimum number of elements from an array such that a specified prefix contains only unique elements.

    Coding & AlgorithmsTechnical ScreenArraysHash MapsGreedy
  • GoogleMediumMachine Learning Engineer
    Minimize Fence Painting Operations

    This problem tests your ability to use a greedy approach or dynamic programming to find the minimum number of strokes required to paint a fence of varying heights.

    Coding & AlgorithmsTechnical ScreenGreedyStackArrays
  • GoogleMediumData Scientist
    Minimize L2, L1, and quantile losses

    This question evaluates understanding of statistical estimators and optimization principles for L2, L1, and tilted absolute (quantile) loss functions, including use of derivatives and subgradients, order-statistics, algorithmic complexity, and robustness considerations.

    Coding & AlgorithmsTechnical Screen
  • GoogleHardSoftware Engineer
    Minimize maximum height along a grid path

    This problem tests your ability to adapt shortest-path algorithms, such as Dijkstra's or Binary Search on the answer, to minimize the maximum edge/node weight along a path.

    Coding & AlgorithmsTechnical ScreenGraphDijkstraBinary Search
  • GoogleMediumData Scientist
    Normalize Columns in Binomial Matrix Efficiently

    This question evaluates proficiency in matrix manipulation, handling of binomial random samples, column normalization, and algorithmic efficiency for processing large numerical arrays.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Rearrange Tasks With Cooldown

    This problem tests your ability to manage dependencies and scheduling constraints using a greedy strategy with a priority queue.

    Coding & AlgorithmsTechnical ScreenGreedyPriority QueueHash Map
  • GoogleHardSoftware Engineer
    Repeatedly Delete Leaves Matching a Target Value From a Binary Tree

    Remove every binary-tree leaf whose value equals a target, repeating as parents turn into matching leaves, and return the possibly empty result in level-order form. It tests reasoning about cascading deletions, correct handling of the root, and edge cases such as matching internal nodes that keep a child.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Return dictionary words matching a prefix

    This problem evaluates string-processing and filtering skills, focusing on exact prefix matching, case sensitivity, duplicate handling, and edge-case management over arrays of strings. Commonly asked in Coding & Algorithms interviews, it assesses practical implementation ability and understanding of algorithmic complexity at an implementation-level (basic to intermediate).

    Coding & AlgorithmsTechnical Screen
  • GoogleHardSoftware Engineer
    Shuffle array using random integer API

    This question evaluates understanding of randomized algorithms, uniform probability distributions over permutations, in-place array manipulation, and time/space complexity analysis within the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Simulate room assignments for scheduled meetings

    This problem tests your ability to manage resources over time using a priority queue and sorting, focusing on handling events and tie-breaking logic for room availability.

    Coding & AlgorithmsTechnical ScreenSortingPriority QueueSimulation
  • GoogleMediumSoftware Engineer
    Sliding Window Average After Dropping the Largest Values

    This problem tests your ability to maintain order and perform efficient removals within a sliding window using balanced data structures or heaps.

    Coding & AlgorithmsTechnical ScreenSliding WindowData StructuresHeaps
  • GoogleMediumSoftware Engineer
    Sliding-Window Mean After Removing the Largest K Values

    Maintain sliding-window means after removing the largest k occurrences, with duplicate-aware rebalancing, exact fractions, and bounded streaming state.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Solve Banana Speed and Interval Merge

    Solve minimum eating speed and merge intervals for a new graduate phone screen. The solution covers binary search on answer, integer ceiling division, monotonic feasibility, interval sorting, overlap merging, correctness, complexity, and edge cases.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Solve Grid and Counting Problems

    This question evaluates skills in grid-based graph traversal and connected-component detection for the island counting task, and combinatorial counting with multiset considerations for the target-word formation task.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Solve Rooms and Top-K Streams

    Design an online resource scheduler that dynamically allocates compute rooms to incoming streaming sessions and tracks the top-k most active streams by cumulative duration.

    Coding & AlgorithmsTechnical Screenheapinterval-schedulingdesign
  • GoogleMediumSoftware Engineer
    Solve array-sum and city-community problems

    This question tests the ability to solve two distinct algorithmic patterns: using a prefix sum hash map to count subarrays with a target sum, and using flood fill to determine the size of connected components in a grid.

    Coding & AlgorithmsTechnical ScreenHash MapPrefix SumDFS
  • GoogleMediumSoftware Engineer
    Solve matrix groups and recipe inventory

    This problem tests your ability to manage hierarchical dependencies using topological sorting and perform block-wise aggregate computations on grid-based data structures.

    Coding & AlgorithmsTechnical ScreenSliding WindowTopological SortGraphs
  • GoogleMediumSoftware Engineer
    Solve several coding interview problems

    This problem tests your ability to perform string-based arithmetic and handle edge cases in digit-by-digit computation.

    Coding & AlgorithmsTechnical ScreenStringsMathSimulation
  • GoogleMediumData Engineer
    User Activity Analytics: Unique Users per Activity and Average Time on Site

    This question evaluates a candidate's ability to process semi-structured event data using grouping, deduplication, and timestamp arithmetic in Python. It falls under coding and algorithms, commonly asked to assess practical data-wrangling skills such as aggregating per-key counts and computing time-based metrics while handling edge cases like unordered records and single-event users.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumSoftware Engineer
    Validate course catalog dependencies

    This question evaluates understanding of graph algorithms and data validation, specifically dependency analysis, cycle detection, and topological ordering.

    Coding & AlgorithmsTechnical Screen
  • GoogleMediumData Engineer
    Write SQL and merge linked lists

    Solve a SQL customer order aggregation task and merge two sorted linked lists. The solution uses CTEs, window functions, LEFT JOINs, COALESCE, latest-order tie handling, optional returned-order filtering, and an O(m+n) dummy-head linked-list merge.

    Coding & AlgorithmsTechnical Screen
  • GrammarlyEasySoftware Engineer
    Recover a Rooted Tree from Depth-Annotated Preorder

    Reconstruct a general ordered tree from its depth-annotated preorder traversal string and return it as a nested tuple.

    Coding & AlgorithmsTechnical Screentreesstackparsing
  • GrammarlyMediumSoftware Engineer
    Reverse a Singly Linked List

    This problem tests your understanding of pointer manipulation and iterative/recursive techniques for modifying linked structures in-place.

    Coding & AlgorithmsTechnical ScreenLinked ListIn-placePointer Manipulation
  • Grayswan AiEasySoftware Engineer
    Implement a debounced function (with leading option)

    This problem tests your understanding of higher-order functions, closure scope, and asynchronous execution control by requiring the implementation of a flexible debounce utility.

    Coding & AlgorithmsTechnical ScreenJavaScriptClosuresAsynchronous
  • GsaHardData Scientist
    Optimize Matrix-Chain Multiplication

    This problem tests your ability to solve a classic dynamic programming challenge, focusing on finding the optimal order of matrix multiplications to minimize the total number of scalar operations.

    Coding & AlgorithmsTechnical ScreenDynamic ProgrammingAlgorithmsOptimization
  • GustoMediumSoftware Engineer
    Fairly Distribute Money With Limits

    This problem tests your ability to implement a greedy allocation algorithm while respecting individual upper bounds and handling iterative redistribution of remaining resources.

    Coding & AlgorithmsTechnical ScreenGreedyBinary SearchSorting
  • GustoMediumSoftware Engineer
    Implement a timestamped map

    This problem tests your ability to design a time-indexed key-value store that supports efficient lookups of historical values using binary search.

    Coding & AlgorithmsTechnical ScreenHash MapBinary SearchData Structures
  • HackerRankMediumSoftware Engineer
    Find Final Ball Holder

    This problem tests your ability to optimize repeated state transitions by identifying cycles in a functional graph or using modular arithmetic to jump through large steps.

    Coding & AlgorithmsTechnical ScreenMathModulo ArithmeticSimulation
  • HadrianHardSoftware Engineer
    Work Order Lead Time: Critical Path Through an Operations DAG to Shipping

    A manufacturing work order is modeled as a directed acyclic graph of operations with durations in days, and every path ends at one shipping node. Compute the total lead time as the critical path length from any starting operation to shipping. It tests graph modeling, dependency ordering and longest-path reasoning.

    Coding & AlgorithmsTechnical Screen