Linkedin logo LI
Verified Company Vault

Linkedin DSA Interview Questions

178 curated coding interview questions directly asked in Linkedin technical rounds, sorted by frequency with recency and difficulty diagnostics.

178 Total Questions
28 (16%) Easy Problems
115 (65%) Medium Problems
35 (20%) Hard Problems
🔥 Most Tested Topics:
Arrays (48)Core DSA (46)Strings (32)Trees (30)Linked List (12)
📂 Sourced Datasets:
Last 3 monthsLast 6 monthsAll questionsOlder than 6 months
Showing 178 of 178 displayed
IDProblemDifficultyTopicPatternAcceptanceFrequencyRecency
716Max StackHardStack / QueueMonotonic Stack / Simulation45.9%100.0%3m
364Nested List Weight Sum IIMediumArrays; Linked ListSorting / Prefix / Scan; Two Pointers67.0%87.5%3m
244Shortest Word Distance IIMediumStringsHashing / Sliding Window62.9%87.5%3m
20Valid ParenthesesEasyStringsHashing / Sliding Window44.2%87.5%3m
53Maximum SubarrayMediumArraysSorting / Prefix / Scan53.3%87.5%3m
17Letter Combinations of a Phone NumberMediumStrings; BacktrackingHashing / Sliding Window; Backtracking66.1%75.0%3m
360Sort Transformed ArrayMediumArraysSorting / Prefix / Scan58.2%75.0%3m
146LRU CacheMediumDesignData Structure Design47.4%75.0%3m
127Word LadderHardStringsHashing / Sliding Window45.6%75.0%3m
50Pow(x, n)MediumCore DSAImplementation / Reasoning38.7%75.0%all
277Find the CelebrityMediumCore DSAImplementation / Reasoning49.0%62.5%3m
380Insert Delete GetRandom O(1)MediumCore DSAImplementation / Reasoning55.4%62.5%3m
1004Max Consecutive Ones IIIMediumCore DSAImplementation / Reasoning67.7%62.5%3m
605Can Place FlowersEasyCore DSAImplementation / Reasoning29.1%62.5%3m
104Maximum Depth of Binary TreeEasyArrays; TreesSorting / Prefix / Scan; DFS / BFS78.2%62.5%3m
339Nested List Weight SumMediumArrays; Linked ListSorting / Prefix / Scan; Two Pointers86.0%62.5%3m
698Partition to K Equal Sum SubsetsMediumArrays; Dynamic Programming; BacktrackingSorting / Prefix / Scan; State Transition; Backtracking38.6%62.5%3m
272Closest Binary Search Tree Value IIHardTrees; Binary SearchDFS / BFS; Binary Search61.2%62.5%3m
366Find Leaves of Binary TreeMediumTreesDFS / BFS81.3%62.5%3m
215Kth Largest Element in an ArrayMediumArrays; HeapSorting / Prefix / Scan; Priority Queue68.9%62.5%3m
528Random Pick with WeightMediumCore DSAImplementation / Reasoning49.1%62.5%3m
744Find Smallest Letter Greater Than TargetEasyStringsHashing / Sliding Window59.2%62.5%3m
200Number of IslandsMediumGraphsBFS / DFS / Topological Sort64.4%62.5%3m
886Possible BipartitionMediumDynamic ProgrammingState Transition52.6%62.5%3m
65Valid NumberHardStringsHashing / Sliding Window23.0%62.5%3m
3Longest Substring Without Repeating CharactersMediumStrings; TreesHashing / Sliding Window; DFS / BFS; Sliding Window39.1%62.5%3m
994Rotting OrangesMediumCore DSAImplementation / Reasoning58.7%62.5%3m
33Search in Rotated Sorted ArrayMediumArrays; Binary SearchSorting / Prefix / Scan; Binary Search44.9%62.5%3m
152Maximum Product SubarrayMediumArraysSorting / Prefix / Scan36.4%62.5%6m
319Bulb SwitcherMediumCore DSAImplementation / Reasoning55.9%62.5%6m
636Exclusive Time of FunctionsMediumCore DSAImplementation / Reasoning66.2%62.5%6m
381Insert Delete GetRandom O(1) - Duplicates allowedHardArraysSorting / Prefix / Scan36.6%62.5%6m
46PermutationsMediumBacktrackingBacktracking81.9%62.5%all
56Merge IntervalsMediumArraysSorting / Prefix / Scan51.8%62.5%all
101Symmetric TreeEasyTreesDFS / BFS61.2%62.5%all
2040Kth Smallest Product of Two Sorted ArraysHardArrays; HeapSorting / Prefix / Scan; Priority Queue48.8%62.5%all
205Isomorphic StringsEasyStringsHashing / Sliding Window48.4%62.5%all
235Lowest Common Ancestor of a Binary Search TreeMediumTrees; Binary SearchDFS / BFS; Binary Search70.6%62.5%all
236Lowest Common Ancestor of a Binary TreeMediumTreesDFS / BFS69.3%62.5%all
243Shortest Word DistanceEasyStringsHashing / Sliding Window66.3%62.5%all
254Factor CombinationsMediumBacktrackingBacktracking50.5%62.5%all
297Serialize and Deserialize Binary TreeHardTrees; DesignDFS / BFS; Data Structure Design60.8%62.5%all
2276Count Integers in IntervalsHardArraysSorting / Prefix / Scan35.9%62.5%all
671Second Minimum Node In a Binary TreeEasyArrays; TreesSorting / Prefix / Scan; DFS / BFS46.1%62.5%all
1650Lowest Common Ancestor of a Binary Tree IIIMediumTreesDFS / BFS83.0%62.5%all
76Minimum Window SubstringHardArrays; Strings; TreesSorting / Prefix / Scan; Hashing / Sliding Window; DFS / BFS; Sliding Window47.5%50.0%6m
432All O`one Data StructureHardCore DSAImplementation / Reasoning44.3%50.0%6m
1188Design Bounded Blocking QueueMediumStack / Queue; DesignMonotonic Stack / Simulation; Data Structure Design73.8%50.0%6m
617Merge Two Binary TreesEasyArrays; TreesSorting / Prefix / Scan; DFS / BFS79.1%50.0%6m
256Paint HouseMediumCore DSAImplementation / Reasoning64.4%50.0%6m
460LFU CacheHardDesignData Structure Design49.2%50.0%6m
149Max Points on a LineHardCore DSAImplementation / Reasoning30.7%50.0%6m
210Course Schedule IIMediumGraphsBFS / DFS / Topological Sort55.5%50.0%6m
516Longest Palindromic SubsequenceMediumCore DSAImplementation / Reasoning65.4%50.0%6m
1Two SumEasyArraysSorting / Prefix / Scan; Two Pointers57.5%50.0%all
21Merge Two Sorted ListsEasyArrays; Linked ListSorting / Prefix / Scan; Two Pointers68.3%50.0%all
23Merge k Sorted ListsHardArrays; Linked List; HeapSorting / Prefix / Scan; Two Pointers; Priority Queue59.6%50.0%all
47Permutations IIMediumBacktrackingBacktracking63.5%50.0%all
57Insert IntervalMediumArraysSorting / Prefix / Scan45.2%50.0%all
68Text JustificationHardCore DSAImplementation / Reasoning51.2%50.0%all
72Edit DistanceMediumDynamic ProgrammingState Transition60.6%50.0%all
103Binary Tree Zigzag Level Order TraversalMediumTreesDFS / BFS63.7%50.0%all
102Binary Tree Level Order TraversalMediumTreesDFS / BFS72.7%50.0%all
150Evaluate Reverse Polish NotationMediumCore DSAImplementation / Reasoning57.8%50.0%all
170Two Sum III - Data structure designEasyArrays; DesignSorting / Prefix / Scan; Two Pointers; Data Structure Design39.1%50.0%all
173Binary Search Tree IteratorMediumTrees; Binary Search; DesignDFS / BFS; Binary Search; Data Structure Design76.5%50.0%all
198House RobberMediumDynamic ProgrammingState Transition53.2%50.0%all
238Product of Array Except SelfMediumArraysSorting / Prefix / Scan68.9%50.0%all
245Shortest Word Distance IIIMediumStringsHashing / Sliding Window59.5%50.0%all
2196Create Binary Tree From DescriptionsMediumTreesDFS / BFS81.7%50.0%all
261Graph Valid TreeMediumStrings; Trees; GraphsHashing / Sliding Window; DFS / BFS; BFS / DFS / Topological Sort50.0%50.0%all
311Sparse Matrix MultiplicationMediumArraysSorting / Prefix / Scan69.3%50.0%all
341Flatten Nested List IteratorMediumLinked List; DesignTwo Pointers; Data Structure Design65.7%50.0%all
367Valid Perfect SquareEasyStringsHashing / Sliding Window44.9%50.0%all
373Find K Pairs with Smallest SumsMediumArraysSorting / Prefix / Scan41.9%50.0%all
2344Minimum Deletions to Make Array DivisibleHardArraysSorting / Prefix / Scan61.4%50.0%all
464Can I WinMediumCore DSAImplementation / Reasoning31.4%50.0%all
2472Maximum Number of Non-overlapping Palindrome SubstringsHardArrays; Strings; Trees; GreedySorting / Prefix / Scan; Hashing / Sliding Window; DFS / BFS; Greedy44.7%50.0%all
515Find Largest Value in Each Tree RowMediumTreesDFS / BFS66.3%50.0%all
2431Maximize Total Tastiness of Purchased FruitsMediumCore DSAImplementation / Reasoning64.6%50.0%all
2532Time to Cross a BridgeHardCore DSAImplementation / Reasoning44.3%50.0%all
633Sum of Square NumbersMediumArraysSorting / Prefix / Scan36.9%50.0%all
647Palindromic SubstringsMediumStrings; TreesHashing / Sliding Window; DFS / BFS72.8%50.0%all
730Count Different Palindromic SubsequencesHardCore DSAImplementation / Reasoning47.8%50.0%all
946Validate Stack SequencesMediumStrings; Stack / QueueHashing / Sliding Window; Monotonic Stack / Simulation70.4%50.0%all
1117Building H2OMediumCore DSAImplementation / Reasoning58.3%50.0%all
1107New Users Daily CountMediumCore DSAImplementation / Reasoning44.6%50.0%all
1127User Purchase PlatformHardCore DSAImplementation / Reasoning46.3%50.0%all
1148Article Views IEasyCore DSAImplementation / Reasoning76.6%50.0%all
1149Article Views IIMediumCore DSAImplementation / Reasoning47.3%50.0%all
1343Number of Sub-arrays of Size K and Average Greater than or Equal to ThresholdMediumArraysSorting / Prefix / Scan72.9%50.0%all
1588Sum of All Odd Length SubarraysEasyArraysSorting / Prefix / Scan84.0%50.0%all
1644Lowest Common Ancestor of a Binary Tree IIMediumTreesDFS / BFS69.7%50.0%all
160Intersection of Two Linked ListsEasyLinked ListTwo Pointers63.7%50.0%all
3480Maximize Subarrays After Removing One Conflicting PairHardArraysSorting / Prefix / Scan64.5%50.0%all
156Binary Tree Upside DownMediumTreesDFS / BFS65.5%37.5%6m
34Find First and Last Position of Element in Sorted ArrayMediumArraysSorting / Prefix / Scan48.9%37.5%6m
61Rotate ListMediumArrays; Linked ListSorting / Prefix / Scan; Two Pointers42.6%37.5%6m
187Repeated DNA SequencesMediumCore DSAImplementation / Reasoning53.3%37.5%6m
827Making A Large IslandHardGraphsBFS / DFS / Topological Sort56.6%37.5%6m
296Best Meeting PointHardGreedyGreedy61.4%37.5%6m
721Accounts MergeMediumArraysSorting / Prefix / Scan61.3%37.5%6m
489Robot Room CleanerHardCore DSAImplementation / Reasoning78.0%37.5%6m
84Largest Rectangle in HistogramHardCore DSAImplementation / Reasoning49.9%37.5%6m
100Same TreeEasyTreesDFS / BFS67.1%37.5%6m
752Open the LockMediumCore DSAImplementation / Reasoning61.3%37.5%6m
206Reverse Linked ListEasyLinked ListTwo Pointers80.6%37.5%6m
126Word Ladder IIHardStringsHashing / Sliding Window27.7%37.5%all
155Min StackMediumStack / QueueMonotonic Stack / Simulation58.2%37.5%all
323Number of Connected Components in an Undirected GraphMediumGraphsBFS / DFS / Topological Sort65.0%37.5%all
384Shuffle an ArrayMediumArraysSorting / Prefix / Scan59.7%37.5%all
611Valid Triangle NumberMediumStringsHashing / Sliding Window56.9%37.5%all
658Find K Closest ElementsMediumCore DSAImplementation / Reasoning49.7%37.5%all
695Max Area of IslandMediumGraphsBFS / DFS / Topological Sort74.0%37.5%all
706Design HashMapEasyDesignData Structure Design66.6%37.5%all
40Combination Sum IIMediumArrays; BacktrackingSorting / Prefix / Scan; Backtracking59.5%37.5%all
470Implement Rand10() Using Rand7()MediumCore DSAImplementation / Reasoning46.4%37.5%all
69Sqrt(x)EasyBinary SearchBinary Search41.8%37.5%all
678Valid Parenthesis StringMediumStringsHashing / Sliding Window40.1%37.5%all
785Is Graph Bipartite?MediumGraphsBFS / DFS / Topological Sort59.3%37.5%all
265Paint House IIHardCore DSAImplementation / Reasoning57.1%37.5%all
32Longest Valid ParenthesesHardStringsHashing / Sliding Window38.8%37.5%all
632Smallest Range Covering Elements from K ListsHardLinked ListTwo Pointers70.1%37.5%all
151Reverse Words in a StringMediumStringsHashing / Sliding Window56.4%37.5%all
3850Count Sequences to KHardCore DSAImplementation / Reasoning36.1%37.5%all
3891Minimum Increase to Maximize Special IndicesMediumArraysSorting / Prefix / Scan19.6%37.5%all
5Longest Palindromic SubstringMediumStrings; TreesHashing / Sliding Window; DFS / BFS37.8%25.0%all
12Integer to RomanMediumStringsHashing / Sliding Window71.0%25.0%all
39Combination SumMediumArrays; BacktrackingSorting / Prefix / Scan; Backtracking76.5%25.0%all
88Merge Sorted ArrayEasyArraysSorting / Prefix / Scan54.9%25.0%all
121Best Time to Buy and Sell StockEasyCore DSAImplementation / Reasoning56.8%25.0%all
143Reorder ListMediumLinked ListTwo Pointers65.3%25.0%all
213House Robber IIMediumDynamic ProgrammingState Transition44.9%25.0%all
763Partition LabelsMediumDynamic ProgrammingState Transition81.9%25.0%all
973K Closest Points to OriginMediumCore DSAImplementation / Reasoning69.0%25.0%all
1197Minimum Knight MovesMediumArraysSorting / Prefix / Scan42.0%25.0%all
28Find the Index of the First Occurrence in a StringEasyStringsHashing / Sliding Window46.7%25.0%all
36Valid SudokuMediumStrings; BacktrackingHashing / Sliding Window; Backtracking64.5%25.0%all
139Word BreakMediumStrings; Dynamic ProgrammingHashing / Sliding Window; State Transition49.5%25.0%all
13Roman to IntegerEasyStringsHashing / Sliding Window66.6%25.0%all
62Unique PathsMediumCore DSAImplementation / Reasoning66.8%25.0%all
226Invert Binary TreeEasyTreesDFS / BFS80.1%25.0%all
921Minimum Add to Make Parentheses ValidMediumArrays; StringsSorting / Prefix / Scan; Hashing / Sliding Window74.4%25.0%all
742Closest Leaf in a Binary TreeMediumTreesDFS / BFS47.4%25.0%all
1570Dot Product of Two Sparse VectorsMediumArraysSorting / Prefix / Scan89.9%25.0%all
274H-IndexMediumCore DSAImplementation / Reasoning41.4%25.0%all
925Long Pressed NameEasyCore DSAImplementation / Reasoning32.9%25.0%all
54201 MatrixMediumArraysSorting / Prefix / Scan53.9%25.0%all
875Koko Eating BananasMediumBinary SearchBinary Search50.0%25.0%all
2964Number of Divisible Triplet SumsMediumArraysSorting / Prefix / Scan67.6%25.0%all
282Expression Add OperatorsHardCore DSAImplementation / Reasoning43.2%25.0%all
230Kth Smallest Element in a BSTMediumTrees; HeapDFS / BFS; Priority Queue76.8%25.0%all
450Delete Node in a BSTMediumTreesDFS / BFS54.7%25.0%all
1944Number of Visible People in a QueueHardStack / QueueMonotonic Stack / Simulation73.1%25.0%all
430Flatten a Multilevel Doubly Linked ListMediumLinked ListTwo Pointers62.9%25.0%all
1857Largest Color Value in a Directed GraphHardGraphsBFS / DFS / Topological Sort57.3%25.0%all
337House Robber IIIMediumDynamic ProgrammingState Transition55.9%25.0%all
1386Cinema Seat AllocationMediumCore DSAImplementation / Reasoning44.6%25.0%all
273Integer to English WordsHardStringsHashing / Sliding Window35.0%25.0%all
621Task SchedulerMediumGreedyGreedy63.1%25.0%all
153Find Minimum in Rotated Sorted ArrayMediumArrays; Binary SearchSorting / Prefix / Scan; Binary Search54.7%25.0%all
7Reverse IntegerMediumCore DSAImplementation / Reasoning31.9%25.0%all
1882Process Tasks Using ServersMediumCore DSAImplementation / Reasoning41.9%25.0%all
1473Paint House IIIHardCore DSAImplementation / Reasoning61.2%25.0%all
1048Longest String ChainMediumStringsHashing / Sliding Window63.0%25.0%all
3113Find the Number of Subarrays Where Boundary Elements Are MaximumHardArraysSorting / Prefix / Scan33.3%25.0%all
560Subarray Sum Equals KMediumArraysSorting / Prefix / Scan47.3%25.0%all
184SumMediumArraysSorting / Prefix / Scan40.6%25.0%all
1041Robot Bounded In CircleMediumCore DSAImplementation / Reasoning56.5%25.0%all
207Course ScheduleMediumGraphsBFS / DFS / Topological Sort51.4%25.0%all
128Longest Consecutive SequenceMediumCore DSAImplementation / Reasoning47.1%25.0%all
98Validate Binary Search TreeMediumStrings; Trees; Binary SearchHashing / Sliding Window; DFS / BFS; Binary Search35.8%25.0%all
490The MazeMediumCore DSAImplementation / Reasoning60.4%25.0%all
141Linked List CycleEasyLinked ListTwo Pointers54.3%25.0%all
1017Convert to Base -2MediumCore DSAImplementation / Reasoning61.9%25.0%all
701Insert into a Binary Search TreeMediumTrees; Binary SearchDFS / BFS; Binary Search73.5%25.0%all
81Search in Rotated Sorted Array IIMediumArrays; Binary SearchSorting / Prefix / Scan; Binary Search40.1%25.0%all
387First Unique Character in a StringEasyStringsHashing / Sliding Window65.5%25.0%all