Topic
Coding & Algorithms interview questions
3276 Coding & Algorithms questions from 366 companies, with hints, runnable code and solution walkthroughs.
273 easy2539 medium464 hard
Coding & Algorithms interview questions by the numbers
Last updated
Katkat has 3,276 Coding & Algorithms interview questions from 366 companies; the most come from Amazon (7%), Meta (7%) and Google (6%). By difficulty: 8% easy, 78% medium and 14% hard. The most common round is Technical Screen (52%). Frequent concepts include Algorithms, Data Structures, Arrays and Greedy.
Companies (366)
Difficulty
- Easy8% · 273
- Medium78% · 2539
- Hard14% · 464
Interview rounds
- Technical Screen52% · 1706
- Onsite33% · 1080
- Online Assessment13% · 427
- HR Screen1% · 37
- Other1% · 26
Roles
- Software Engineer80% · 2629
- Machine Learning Engineer8% · 253
- Data Scientist7% · 241
- Data Engineer1% · 45
- Backend Engineer1% · 26
Frequent concepts
- Algorithms9% · 302
- Data Structures7% · 228
- Arrays5% · 176
- Greedy5% · 164
- Optimization5% · 151
- Hash Map4% · 124
Most mentioned in interview experiences
- 1.Solve Algorithmic Challenges in Online Coding Assessments15 reports
- 2.Solve LeetCode string and list problems11 reports
- 3.Solve sliding-window and heap problems8 reports
- 4.Implement LRU cache with O(1) ops7 reports
- 5.Implement and Analyze an LRU Query Cache6 reports
- 6.Determine Length of Longest Unique Substring5 reports
- 7.Match-3 Grid: Find Horizontal and Vertical Runs, Then Clear and Drop Cells5 reports
- 8.Design a single- and multi-threaded web crawler4 reports
- 9.Find an Exit in a URL Maze4 reports
- 10.Find deployable slots in a recurring week from allowed and freeze windows4 reports
Counted from 781 candidate interview experiences on Katkat. How we collect and count
Showing 1531–1560 of 3276 results
This problem tests your ability to implement the exponentiation by squaring algorithm while correctly handling edge cases like negative exponents and integer overflow.
LinkedInSoftware EngineerCoding & AlgorithmsOnsiteThis problem tests the implementation of the K-means clustering algorithm from scratch, requiring an understanding of the iterative refinement process, distance metrics, and the underlying mathematical objective.
LinkedInMachine Learning EngineerCoding & AlgorithmsTechnical ScreenThis question evaluates understanding of data structures and algorithmic complexity, focusing on designing a stack variant that supports efficient retrieval and removal of the current maximum while preserving stack behavior.
LinkedInData EngineerCoding & AlgorithmsTechnical ScreenThis 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.
LinkedInMachine Learning EngineerCoding & AlgorithmsOnsiteThis 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.
LinkedInSoftware EngineerCoding & AlgorithmsOnsiteThis question evaluates understanding of probabilistic algorithm design, numerical stability, and efficient data-structure implementation for constant-time sampling from categorical distributions.
LinkedInData ScientistCoding & AlgorithmsTechnical ScreenThis question evaluates understanding of streaming algorithms, uniform random sampling, and probabilistic guarantees for maintaining a fixed-size sample from an unbounded data stream (reservoir-sampling concepts).
LinkedInData ScientistCoding & AlgorithmsTechnical ScreenGiven 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.
LinkedInSoftware EngineerCoding & AlgorithmsOnsiteGiven 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.
LinkedInSoftware EngineerCoding & AlgorithmsOnsiteThis problem tests your ability to manage a sliding window with a flexible constraint, specifically counting zeros to determine the maximum length of a sequence after a single modification.
LinkedInSoftware EngineerCoding & AlgorithmsTechnical ScreenGiven 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.
LinkedInSoftware EngineerCoding & AlgorithmsOnsiteMerge two rooted n-ary trees in which every node has an integer key, combining nodes only when their keys match under matching parents. Tests recursive tree traversal, matching children by key, handling roots with different keys, and producing a canonical preorder encoding of the merged tree.
LinkedInSoftware EngineerCoding & AlgorithmsTechnical ScreenThis interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Minimize adjacent-color assignment cost states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
LinkedInSoftware EngineerCoding & AlgorithmsTechnical ScreenCoding problem: given a list of words and two different target words that both appear in it, return the smallest distance between an index of one word and an index of the other. It tests single-pass scanning with position tracking, handling of repeated occurrences, and time complexity analysis.
LinkedInSoftware EngineerCoding & AlgorithmsTechnical Screen- Reverse a linked listMedium
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.
LinkedInSoftware EngineerCoding & AlgorithmsOnsite 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.
LinkedInMachine Learning EngineerCoding & AlgorithmsOnsiteThis 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.
LinkedInMachine Learning EngineerCoding & AlgorithmsOnsiteGiven a full binary tournament tree stored in array order, where each internal node holds the smaller of its two children, return the second-smallest leaf value in logarithmic time. It tests reasoning about how a knockout structure constrains where the runner-up can be, array-based tree indexing, and justifying a partial search.
LinkedInSoftware EngineerCoding & AlgorithmsTechnical ScreenReturn the shortest substring of a string that contains every character of a pattern with matching multiplicity, case-sensitively, choosing the leftmost substring on ties and an empty string when none exists. Tests efficient substring search and careful character-count bookkeeping.
LinkedInSoftware EngineerCoding & AlgorithmsOtherTests designing an inverted index and using two-pointer or binary search techniques to efficiently compute the minimum absolute index distance between word occurrences across repeated queries.
LinkedInSoftware EngineerCoding & AlgorithmsTechnical ScreenThis 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.
LinkedInSoftware EngineerCoding & AlgorithmsOnsiteAssesses core string and array manipulation skills by requiring string reversal and contiguous-subarray computations for maximum sum and maximum product, identified under the Coding & Algorithms category.
LinkedInSoftware EngineerCoding & AlgorithmsTechnical ScreenThis 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.
LinkedInSoftware EngineerCoding & AlgorithmsOnsiteThis 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.
LinkedInSoftware EngineerCoding & AlgorithmsOnsiteThis problem tests your ability to solve a sliding window string problem followed by a heap-based retrieval task for ranked items.
LinkedInSoftware EngineerCoding & AlgorithmsOnsiteGiven an integer array sorted in ascending order and the coefficients of a quadratic function, apply the function to every element and return the results in sorted order in linear time. Tests reasoning about the shape of a parabola, handling of positive, negative and zero leading coefficients, and duplicate values.
LinkedInMachine Learning EngineerCoding & AlgorithmsTechnical ScreenCompute the sum of all elements of an array with any number of dimensions when the array exposes only its dimension sizes and a get method that reads one element from a full list of indices. It tests systematic enumeration of every index combination and exact handling of sums beyond the 32-bit range.
LinkedInMachine Learning EngineerCoding & AlgorithmsTechnical ScreenReturn binary-tree values level by level while alternating left-to-right and right-to-left order without changing level membership.
LinkedInSoftware EngineerCoding & AlgorithmsOnsiteWrite a function that turns a truncated prefix of streamed JSON, made only of strings and nested arrays, into the value received so far. It tests careful parsing of half-received strings, unclosed arrays and input that ends after a comma, along with writing your own edge-case tests.
Listen LabsSoftware EngineerCoding & AlgorithmsTechnical ScreenWrite a function that turns a scanner feed cut off mid-transmission into the best pick-list it can represent so far, recovering half-written labels and unfinished bin groupings. Tests careful state-machine parsing of truncated nested data.
Listen LabsSoftware EngineerCoding & AlgorithmsTechnical Screen