READ. UNDERSTAND. PRACTICE.
Coding questions
Explore algorithm tutorials, coding and system design questions, interview experiences, and computer science study guides.
1,899 resources · Page 60 of 80
Coding questions · Oracle
Minimize sum with halving operations
This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Minimize sum with halving operations states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Coding questions · Microsoft
Minimize the Largest Value When Picking at Least k Non-Adjacent Houses
Pick at least k houses from a row without choosing two neighbors, so that the largest amount in any chosen house is as small as possible, and return that minimum. With up to 100,000 houses and values up to one billion, the task tests reasoning about a min-max objective under an adjacency constraint.
Coding questions · Walmart Labs
Minimize the Maximum Edge on a Path
Find a path in a weighted undirected graph that minimizes its largest edge rather than the sum of weights. Handle parallel edges, disconnected vertices, and the start-equals-target case efficiently at large graph scale.
Coding questions · Dark Alpha Capital
Minimize Total Assignment Distance
This question evaluates competency in combinatorial optimization, assignment/matching problems, and reasoning about Manhattan distance cost metrics. Commonly asked to assess algorithmic reasoning about constrained assignments, search and complexity trade-offs, it belongs to the Coding & Algorithms domain and emphasizes practical application of algorithm design and implementation rather than purely conceptual theory.
Coding questions · Ge
Minimize total distance to a store
This pair of problems evaluates algorithmic problem-solving skills, focusing on spatial optimization with Manhattan distances for grid-based demand aggregation and sequential penalty minimization on binary time-series data, emphasizing reasoning about aggregation and trade-offs.
Coding questions · Waymo
Minimize Total Grid Distance to Every Building
Find an empty grid cell minimizing total shortest-path distance to all buildings while respecting obstacles and building traversal restrictions.
Coding questions · Amazon
Minimum Adjacent Swaps to Group a Binary Array
Find the minimum adjacent swaps needed to group every zero at one end and every one at the other, choosing the cheaper orientation. The problem tests inversion counting, already-grouped inputs, balanced choices, and 64-bit accumulation.
Coding questions · Headlands
Minimum Character Replacements So No Two Adjacent Characters Are Equal
Given a string of lowercase letters, find the minimum number of single-position replacements needed so that no two adjacent characters are equal. It tests turning an adjacency constraint into an exact minimum count, justifying why fewer operations cannot work, and handling edge cases in an efficient solution.
Coding questions · Bloomberg
Minimum Character Replacements to Make One String an Anagram of Another
Given two strings of equal length made of lowercase letters, find the fewest single-character replacements in the second string that turn it into an anagram of the first. This phone-screen coding problem tests character frequency counting and precise reasoning about which letters must change.
Coding questions · Whatnot
Minimum Department Visits to Buy a Shopping List from a Store Map
Given a store map listing the department of each product and a shopping list that may repeat items, compute the minimum number of department visits needed to buy everything when items may be bought in any order. It tests turning a word problem into a precise counting rule and handling large inputs efficiently.
Coding questions · Virtu
Minimum Number of Transfers to Settle All Debts in a Group
Given a list of past loans between people, compute the minimum number of new money transfers needed so that everyone's net balance returns to zero. Tests reducing a transaction log to net balances and searching for the fewest settling transfers under small input bounds.
Coding questions · Goldman Sachs
Minimum Starting Health to Cross a Grid Moving Only Right or Down
Given a grid of damage and healing values, find the smallest positive starting health that lets a traveler move only right or down from the top-left cell to the bottom-right cell without health ever dropping below one. It tests dynamic programming over grid paths and precise handling of the first and last cells.
Coding questions · Capital One
Minutes Until the Next Bus From a Daily Departure Schedule
Given one day's bus departure times as HH:MM strings and the current time, return how many minutes remain until the next departure, or -1 when no bus is left that day. Tests time parsing, handling of unsorted and duplicate schedule entries, and exact boundary rules such as a bus leaving right now.
Coding questions · Palo Alto Networks
Mirror a binary tree and analyze complexity
This question evaluates understanding of binary tree manipulation and traversal methods, emphasizing recursion and iterative approaches as well as the ability to reason about time and space complexity.
Coding questions · DoorDash
Model schema and query new-market readiness
This question evaluates SQL-based data manipulation skills including time-series aggregation, cohort analysis, percentile/median calculations, joins between event and reference tables, and deriving operational KPIs for new-market readiness; it targets the Data Manipulation (SQL/Python) domain for a Data Scientist role.
Coding questions · Snapchat
Monitor Friend-Request System for Quality and Abuse
This question evaluates a candidate's ability to compute time-based acceptance metrics, reason about data quality and abuse signals, and apply joins and filters in SQL/Python while accounting for nulls and incomplete user records.
Coding questions · Uber
Move zeros to the front
This question evaluates array manipulation skills, in-place algorithm design, and reasoning about time and space complexity while preserving element order under an O(1) extra space constraint.
Coding questions · Netflix
Multiply Two Sparse Integer Matrices Given as Dense Grids
Given two integer matrices stored as dense lists of rows in which most entries are zero, return their exact matrix product. It tests handling matrix dimensions correctly and exploiting sparsity to skip work on zero entries while still producing every entry of the result.
Coding questions · Meta
Navigate unknown maze to find target
This question evaluates understanding of graph traversal and exploration algorithms, representation of visited state and frontiers, path optimality, and complexity analysis in an environment constrained to local actions.
Coding questions · Bridge
Normalize a file path
This question evaluates string manipulation and parsing skills, specifically understanding Unix-style filesystem path semantics and edge-case normalization.
Coding questions
Number Entries Within Each Conversation
Assign one-based entry numbers per conversation using timestamp and identifier ordering in a PostgreSQL window-function query.
Coding questions · Instacart
Optimize file reads for password validation
This question evaluates proficiency in on-disk file I/O, streaming algorithms, offline indexing for sublinear lookups, and system-level performance considerations for validating credentials in large files.
Coding questions · Optiver
Optimize flight and cargo bookings for profit
This question evaluates resource allocation, combinatorial optimization, and online/streaming algorithm design within the Coding & Algorithms domain, requiring reasoning about assigning weight‑constrained cargo to flights under timing and cost constraints; it is commonly asked to assess algorithmic thinking about trade-offs between revenue and booking cost, constraint satisfaction, and handling dynamic inputs. The problem tests both conceptual understanding of optimization and online decision‑making and practical application skills for implementing incremental processing and robust handling of failed bookings.
Coding questions · Capital One
Optimize invites under capacity constraints
This question evaluates a candidate's competency in probabilistic expected-value optimization, algorithmic efficiency for large-scale inputs, and constrained combinatorial selection including grouped all-or-nothing decisions and cost modeling.