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 511–540 of 1080 results
- LinkedInMediumSoftware EngineerDesign a max-stack with efficient 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 Design a max-stack with efficient operations states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerFewest-Edge Distance Between Two Nodes in a Directed Acyclic Graph
Given a directed acyclic graph and two nodes, return the fewest edges on a directed path from the source to the target, 0 when they are the same node, or -1 when the target cannot be reached. Asked as a follow-up to topological ordering, it tests traversal of dependency graphs.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerFind dictionary words matching a phone digit string
This problem tests your ability to map phone keypad digits to characters and efficiently filter a provided dictionary to find words that match a specific digit sequence.
Coding & AlgorithmsOnsiteStringHash TableTrie - LinkedInMediumSoftware EngineerFind lowest common ancestor
This question evaluates understanding of binary tree structure, lowest common ancestor concepts, and competency in algorithmic reasoning and tree traversal within the Coding & Algorithms category.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerFind the K Closest Values in a Sorted Array
This problem tests binary search and window optimization to find the k nearest elements to a target in a sorted integer array.
Coding & AlgorithmsOnsiteBinary SearchTwo PointersArrays - LinkedInMediumSoftware EngineerFind the K Values Closest to a Target in a Binary Search Tree
Given a binary search tree described by its preorder traversal, a real-valued target and an integer k, return the k node values closest to the target in ascending order, breaking distance ties toward the smaller value. Tests binary search tree traversal, reasoning over ordered data and precise tie handling.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerFind the Maximum Depth of a Binary Tree
Find binary-tree depth from a portable child-index representation, including empty trees and highly unbalanced root-to-leaf paths.
Coding & AlgorithmsOnsite - LinkedInMediumDevOps EngineerFind the Nearest Supply Location in a Road Network
This problem tests your ability to model a road network as a graph and compute the shortest distance from a source node to any target node in a set using a Breadth-First Search (BFS) approach.
Coding & AlgorithmsOnsiteGraphBFSShortest Path - LinkedInMediumSoftware EngineerFind the k-th largest element in an array
This question evaluates proficiency with selection algorithms, array manipulation, and analysis of time and space complexity, reflecting competency in order-statistics and basic data structures.
Coding & AlgorithmsOnsite - LinkedInMediumMachine Learning EngineerGenerate uniform 0–6 from biased coin
This question evaluates understanding of randomized algorithms, probability theory, and techniques for extracting uniform randomness from a biased source.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerImplement Fast Power with Negative Exponents
This problem tests your ability to implement the exponentiation by squaring algorithm while correctly handling edge cases like negative exponents and integer overflow.
Coding & AlgorithmsOnsiteAlgorithmsMathBit Manipulation - LinkedInMediumMachine Learning EngineerImplement alert queries and spike detection
This problem tests your ability to process a stream of events with time-based constraints, requiring an efficient sliding-window approach and the use of monotonic data structures for spike detection.
Coding & AlgorithmsOnsiteSliding WindowData StructuresStreaming - LinkedInMediumSoftware EngineerImplement an LRU cache with follow-ups
This question evaluates understanding of core data structures and algorithms for designing an efficient LRU cache as well as knowledge of concurrency and synchronization for thread-safe access.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerLargest Sum of a Non-Empty Contiguous Subarray
Given an integer array, return the largest sum of any non-empty contiguous subarray, including arrays in which every number is negative. This classic phone-screen problem tests efficient array processing and careful handling of edge cases such as all-negative input.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerLexicographically Smallest Topological Order of a Dependency Graph
Given n labeled nodes and directed precedence edges, return an ordering that respects every edge, choosing the lexicographically smallest valid ordering, or an empty list when a cycle makes ordering impossible. It tests topological sorting, cycle detection and deterministic tie-breaking.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerMaximum Product of a Contiguous Subarray With Negatives and Zeros
Given an integer array that may contain negative numbers and zeros, return the largest product of any non-empty contiguous subarray. The problem tests careful reasoning about sign changes, zeros and single-element subarrays under tight input-size limits.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerReverse a linked list
This question evaluates understanding of linked list data structures and proficiency manipulating pointers or references to perform in-place transformations when reversing a linked list. Commonly asked in Coding & Algorithms interviews, it gauges algorithmic thinking and practical application-level competency in list operations rather than purely conceptual theory.
Coding & AlgorithmsOnsite - LinkedInMediumMachine Learning EngineerSample index from probability distribution
This question tests the ability to implement a weighted random sampling algorithm efficiently using prefix sums and binary search to achieve sub-linear query time.
Coding & AlgorithmsOnsiteAlgorithmsProbabilityBinary Search - LinkedInMediumMachine Learning EngineerSample uniformly from a circle’s area
This question evaluates understanding of continuous probability distributions and geometric random sampling, testing whether a candidate recognizes how area-weighted uniformity differs from naive radial choices.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerSolve Cache, Window, and Heap Problems
This question evaluates competency in advanced data structures and algorithmic techniques—specifically frequency-based cache design, sliding-window substring search, and heap-driven k-pair generation—along with time and space complexity analysis and robust edge-case handling.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerSolve min window & animal conflicts
This question evaluates understanding of string algorithms, frequency-based sliding window techniques and hashmap/graph-based conflict detection, focusing on minimal substring search and modeling pairwise exclusions.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerSolve six algorithmic problems
This multi-part question evaluates algorithmic problem solving, data-structure selection, complexity analysis, API design, and the handling of trees, arrays, grids, circular structures, and dynamic updates.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerSolve substring and top‑K pair problems
This problem tests your ability to solve a sliding window string problem followed by a heap-based retrieval task for ranked items.
Coding & AlgorithmsOnsiteSliding WindowHeapString Manipulation - LinkedInMediumSoftware EngineerTraverse a Binary Tree in Zigzag Level Order
Return binary-tree values level by level while alternating left-to-right and right-to-left order without changing level membership.
Coding & AlgorithmsOnsite - LyftMediumSoftware EngineerAssign Tasks to the Minimum Number of Workers
Assign interval tasks to the minimum number of workers while preserving deterministic worker IDs and original output order. Reason about overlapping times, tie handling, resource reuse, efficient scheduling at scale, and boundary cases where one task ends as another begins.
Coding & AlgorithmsOnsite - LyftMediumSoftware EngineerDesign a temporal key-value store with historical reads
This question evaluates a candidate's grasp of data structures and algorithms needed to implement a temporal key-value store supporting timestamped set/get operations and efficient historical reads, including performance targets like O(log n) per operation.
Coding & AlgorithmsOnsite - LyftHardSoftware EngineerImplement Grid Spread and Transactional Store
This question evaluates skills in grid-based propagation modeling and stateful transactional system design, testing concepts such as graph traversal and timed spread dynamics for the grid task and nested transaction semantics, isolation, and state management for the in-memory key-value store.
Coding & AlgorithmsOnsite - LyftEasySoftware EngineerImplement a Key-Value Store with Nested Transactions
Implement an in-memory string key-value store with lookup, assignment, deletion, value counts, and deeply nested transactions. Define visibility plus exact begin, rollback, and inner or outer commit behavior without copying the entire database per transaction.
Coding & AlgorithmsOnsite - LyftMediumSoftware EngineerImplement command-driven in-memory key-value database
This question evaluates a candidate's ability to design efficient in-memory data structures and implement transactional semantics for operations like SET/GET/DELETE/COUNT, including handling nested transactions, rollbacks, and commits.
Coding & AlgorithmsOnsite - LyftMediumSoftware EngineerImplement paginated retrieval of transactions
Implement paginated retrieval of transactions 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.
Coding & AlgorithmsOnsite