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 1501–1530 of 3276 results
- LinkedInMediumSoftware EngineerCheck Whether a String Is a Signed Decimal Number Without Exponent Notation
Write a function that decides whether a string is a valid plain decimal number with an optional sign and fractional part, rejecting exponents, stray symbols, and repeated decimal points. It tests turning a small grammar into careful character-by-character validation and covering edge cases such as empty strings and bare signs.
Coding & AlgorithmsTechnical Screen - LinkedInMediumSoftware EngineerCompare heap and stack memory
This question evaluates understanding of memory management concepts including stack versus heap allocation, object lifetimes, allocation and free behavior, access patterns, performance characteristics, and thread visibility within the Coding & Algorithms domain.
Coding & AlgorithmsTechnical Screen - LinkedInMediumSoftware EngineerCompute graph distance and impacted services
This problem tests your ability to model a directed dependency graph and perform reachability analysis to identify all downstream services affected by a change in a root service.
Coding & AlgorithmsOnsiteGraphsBFSDFS - LinkedInEasyMachine Learning EngineerCompute point-to-segment minimum distance
This problem tests your ability to apply vector projections and geometric constraints to find the shortest distance from a point to a line segment in a 2D plane.
Coding & AlgorithmsTechnical ScreenGeometryVectorsMath - LinkedInMediumMachine Learning EngineerCompute total covered interval length
Compute total covered interval length 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 & AlgorithmsTechnical Screen - LinkedInMediumSoftware EngineerCount Distinct Values in a Huge Sorted Array
This problem tests your ability to optimize search operations in a sorted array by using binary search to skip redundant elements, achieving sub-linear time complexity relative to the total array size.
Coding & AlgorithmsOnsiteBinary SearchArraysOptimization - LinkedInMediumSoftware EngineerCount Subsequences Whose Minimum Plus Maximum Stays Within a Target
Count the non-empty subsequences of an integer array whose minimum plus maximum is at most a target, returning the count modulo 10^9 + 7. Tests combinatorial counting, careful handling of duplicate values chosen by index, and modular arithmetic for very large totals.
Coding & AlgorithmsOther - LinkedInMediumSoftware EngineerCount connected land components in a grid
This question evaluates understanding of grid traversal and graph connectivity concepts, focusing on modeling a 2D matrix as adjacency relationships within the coding and algorithms domain.
Coding & AlgorithmsOnsite - LinkedInMediumSoftware EngineerCount islands and distinct shapes
This question evaluates a candidate's understanding of grid-based graph traversal and connected-component detection, along with the ability to recognize and canonicalize distinct island shapes.
Coding & AlgorithmsOnsite - LinkedInEasySoftware EngineerDebug Queues and Solve Arrays
Tests array traversal, sliding window techniques, and handling wrap-around logic in circular data structures with edge cases.
Coding & AlgorithmsOnsiteArraySliding WindowTwo Pointers - LinkedInEasySoftware EngineerDesign O(1) Randomized Multiset
This problem tests your ability to design a data structure that supports efficient insertion, deletion, and uniform random sampling by combining dynamic arrays with hash maps to achieve constant time complexity.
Coding & AlgorithmsTechnical ScreenHash MapArrayDesign - LinkedInMediumSoftware EngineerDesign a Randomized Multiset
This question evaluates the ability to design and implement a randomized multiset that correctly handles duplicate integer occurrences while providing expected O(1) insert, remove, and uniform getRandom operations, testing knowledge of data structures, randomness, and performance constraints.
Coding & AlgorithmsTechnical Screen - 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 EngineerDesign a stack with max removal
This question evaluates data-structure design and algorithmic complexity analysis by requiring a stack-like structure that supports standard stack operations plus efficient maximum retrieval and targeted removal, assessing practical implementation skills and time-complexity reasoning at a practical application level.
Coding & AlgorithmsTechnical Screen - 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 a Target's Index in a Rotated Sorted Array of Distinct Integers
Find the index of a target value in an array of distinct integers that was sorted ascending and then rotated at an unknown pivot, returning -1 when it is absent. Tests adapting search to a partially ordered array in logarithmic time and handling unrotated and single-element inputs.
Coding & AlgorithmsOther - 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 - LinkedInEasySoftware EngineerFind dictionary words that match a phone keypad digit sequence
Coding problem: given a list of known words and a digit string typed on a standard phone keypad, return every known word whose letters map to exactly that digit sequence, in sorted order. It tests string encoding, choosing a lookup structure for the dictionary, and analyzing time complexity.
Coding & AlgorithmsTechnical Screen - LinkedInMediumData ScientistFind index with positive suffix sums
This problem tests your ability to optimize array traversals using prefix or suffix sums, specifically evaluating your skill in calculating cumulative values efficiently in O(n) time.
Coding & AlgorithmsTechnical ScreenArraysSuffix SumOptimization - 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 - LinkedInMediumMachine Learning EngineerFind 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.
Coding & AlgorithmsTechnical Screen - 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 Node Where Two Singly Linked Lists Merge
Two singly linked lists stored in one successor array may merge at some node and share every node after it. Given both heads, return the first shared node, or -1 if the lists never meet. It tests linked-list traversal and careful handling of cases such as one list starting inside the other.
Coding & AlgorithmsTechnical Screen - 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 - LinkedInMediumSoftware EngineerGenerate All Distinct Permutations of a List with Duplicate Values
Given a list of up to eight integers that may contain duplicates, return every distinct permutation exactly once, sorted in lexicographic order. It tests systematic enumeration, avoiding duplicate results caused by equal values, and producing a deterministic output order.
Coding & AlgorithmsTechnical Screen - 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 - LinkedInEasyData ScientistHow do you sample uniformly from an infinite stream?
This question tests the implementation of Reservoir Sampling to maintain a uniform random sample of size k from a stream of unknown or infinite length.
Coding & AlgorithmsTechnical ScreenAlgorithmsProbabilityStreaming