cswork / libraryOpen practice workspace

READ. UNDERSTAND. PRACTICE.

Coding questions

Explore algorithm tutorials, coding and system design questions, interview experiences, and computer science study guides.

1,899 resources · Page 38 of 80

  1. Coding questions · Microsoft

    Find shortest substring with n unique letters

    This question evaluates proficiency in string processing, frequency management, and algorithmic optimization for locating constrained contiguous substrings. Commonly asked in the coding & algorithms domain because it reveals how candidates reason about character distinctness and efficiency trade-offs, it targets practical application of algorithmic techniques rather than purely conceptual theory.

  2. Coding questions · Amazon

    Find shortest transformation steps in a word graph

    This question evaluates a candidate's ability to model string transformations as a graph, apply graph traversal and shortest-path reasoning, and manage efficient string-based search and data-structure choices within the Coding & Algorithms domain.

  3. Coding questions · LinkedIn

    Find shortest word transformation with caching

    Find shortest word transformation with caching evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

  4. Coding questions · Moloco

    Find single element when others repeat k times

    This question evaluates understanding of array indexing, grouping patterns, and algorithmic complexity in the presence of repeated elements and a single outlier within a sorted sequence.

  5. Coding questions · Apple

    Find Smallest Missing Positive Integer in O(n) Time

    This question evaluates a candidate's skill in array algorithms and in-place algorithm design, emphasizing understanding of time and space complexity and handling edge cases when identifying the smallest missing positive integer.

  6. Coding questions · Schonfeld

    Find smallest N for 5-and-21 sums

    This question evaluates understanding of integer linear combinations and elementary number theory, framed as a Frobenius coin problem that examines representability using non-negative multiples of 5 and 21.

  7. Coding questions · Uber

    Find smallest start index avoiding left exit

    This question evaluates a candidate's ability to analyze reachability and cycle behavior in array-based functional graphs, testing competency in array manipulation, traversal, loop detection, and runtime optimization within the Coding & Algorithms domain.

  8. Coding questions · HubSpot

    Find spammer with minimal hasMessaged calls

    Find the "spammer" account that messaged every other account but received from none, using only a hasMessaged(a, b) oracle. This is the classic find-the-celebrity problem inverted, solved with a two-phase elimination-then-verify algorithm in O(n) oracle calls and O(1) extra space, with full correctness proof and edge-case handling.

  9. Coding questions · Amazon

    Find substring from dictionary concatenation

    This question evaluates proficiency in string-processing algorithms, word-lookup data structures and algorithmic complexity analysis within the Coding & Algorithms domain. It is commonly asked to assess practical implementation ability and conceptual understanding of performance trade-offs, edge-case handling (e.g.

  10. Coding questions · TikTok

    Find substring where all chars appear at least k

    This question evaluates proficiency in string processing, frequency analysis, and algorithmic reasoning for constrained-substring problems, along with the ability to analyze time and space complexity.

  11. Coding questions · Glean

    Find the Cell with the Smallest Total Walking Distance to All Targets Around Walls

    Given a grid of targets, empty cells and walls, find the cell with the smallest total walking distance to every target, where paths cannot cross walls, or report that no cell reaches them all. Tests breadth-first search from multiple sources, accumulating distances and handling unreachable regions.

  12. Coding questions · Amazon

    Find the deepest shared ancestor of two keys in a binary search tree

    Given a binary search tree in level-order form and two distinct keys present in it, return the key of their lowest common ancestor, where a node counts as its own ancestor. Tests reasoning with the search tree ordering, plus time and space analysis on skewed trees.

  13. Coding questions · ByteDance

    Find the Earliest Contiguous Removal That Balances Index Sums

    Find the earliest fixed-length block to remove so the remaining array has equal even- and odd-index sums, accounting for the reindexed suffix.

  14. Coding questions · Apple

    Find the Extra Edge

    This question evaluates understanding of graph theory concepts—cycle formation and edge connectivity—and the competency in applying graph algorithm techniques to identify and remove a redundant edge in an undirected graph.

  15. Coding questions · Capital One

    Find the First Array Element Smaller Than Both of Its Neighbors

    A coding problem that asks for the first element of an integer array whose left and right neighbors are both strictly larger than it, returning -1 when no element qualifies. It tests careful boundary handling, strict comparisons when neighbors are equal, and precise output rules.

  16. Coding questions · Qualcomm

    Find the First Bad Version in a Monotonic Release History

    Find the earliest bad entry in a monotonic release history, returning -1 when every version is good. This compact coding prompt tests boundary-safe binary search, empty and all-good inputs, first-element failures, loop invariants, and logarithmic performance on histories with up to a million versions.

  17. Coding questions · Microsoft

    Find the First Value Repeated During a Left-to-Right Scan

    Find the earliest repeated value in scan order, then analyze sorted-input and no-built-in-set variants without losing the original ordering rule.

  18. Coding questions · Render

    Find the Five Busiest Client IPs in Request Logs

    Aggregate completed HTTP request logs across files to find the top five client IPv4 addresses, excluding auxiliary messages and applying deterministic count ties.

  19. Coding questions · ZipHQ

    Find the Guaranteed Capture Time in a Turn-Based Graph Game

    Solve guaranteed capture time in a finite turn-based graph pursuit game, including Jerry-first moves, staying, optimal adversarial play, and infinite evasion on cycles.

  20. Coding questions · Collegevine

    Find the Highest-Cost Top-Level Job

    This question evaluates the ability to process hierarchical JSON data, aggregate durations across tree-structured job relationships, and reason about robustness and scalability concerns such as malformed input handling and performance for large datasets.

  21. Coding questions · Otter.Ai

    Find the Highest-Paid Employee in Each Department

    Work through a tie-aware PostgreSQL problem that finds every highest-paid employee in each department. It assesses relational reasoning, correct joins, duplicate-name handling, and precise output semantics without assuming a single winner.

  22. Coding questions · Capital One

    Find the Integer Point Covered by the Most Street Lamps

    Street lamps on a number line each light a closed interval around their position; return the integer point lit by the most lamps, choosing the smallest coordinate on ties. Tests coverage counting over a wide coordinate range and correct handling of inclusive endpoints.

  23. Coding questions · Glean

    Find the k-th Largest Value Across Two Sorted Arrays Without Fully Merging Them

    Given two arrays sorted in non-decreasing order and an integer k, return the k-th largest value among all their elements, counting duplicates separately. Tests reasoning about ranks across two sorted sequences, careful handling of empty arrays and duplicates, and moving past a linear scan toward logarithmic time.

  24. Coding questions · Amazon

    Find the K-th Smallest Value in Two Sorted Arrays

    Given two nondecreasing integer arrays and a one-based integer k, return the k-th smallest value in their combined multiset. Work through the function contract, boundary cases, correctness argument, and time and space complexity expected in a production-quality solution.