InterviewKata
Interview preparation

Nvidia interview problems, by pattern

All 19 problems from Nvidia's six-month LeetCode list (4 Easy, 12 Medium, 3 Hard), grouped by the pattern that solves them. 18 are solved on this site: open one to see which pattern to choose and why, the approach, the code with a line-by-line explanation, and a player that steps through the code on LeetCode's own example. Easy warm-ups and SQL/JavaScript problems link to LeetCode.

On the pattern pages these problems carry a Nvidia badge. Frequency is LeetCode's relative score for this list (100 = asked most often). Read a pattern page first, then work through its group here from the most to the least frequent problem.

A 6-month plan

About 5–6 problems on 5 days a week. Each month: read the pattern page, solve its worked examples without looking, then this list. Re-solve anything you needed a hint for one week later.

WhenFocusPatterns (problems on the list)Total
Month 1Foundations: arrays you can scan01 · Prefix Sum (1)
02 · Two Pointers (1)
03 · Sliding Window (1)
04 · Fast & Slow Pointers (2)
05 · LinkedList In-place Reversal (1)
6
Month 2Stacks, heaps, intervals, binary search07 · Top 'K' Elements (2)
09 · Modified Binary Search (1)
17 · Stack (1)
4
Month 3Trees and graphs13 · Matrix Traversal (1)1
Month 4Search and dynamic programming14 · Backtracking (1)1
Month 5Hashing, greedy, design, weighted graphs16 · Hash Map & Set (2)
18 · Greedy (3)
19 · Trie & Design (1)
20 · Shortest Path & MST (1)
7

In the last two weeks, filter to Hard, sort your attention by frequency, and do timed mock interviews: 45 minutes, talk through the brute force, name the pattern, then code it.

All problems

01 02 03 04 05 07 09 13 14 16 17 18 19 20

01 · Prefix Sum 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
930Binary Subarrays With SumMedium79Array, Hash Table, Sliding Window, Prefix Sum

02 · Two Pointers 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
42Trapping Rain WaterHard79Array, Two Pointers, Dynamic Programming, Stack, Monotonic Stack

03 · Sliding Window 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
121Best Time to Buy and Sell StockEasy91Array, Dynamic Programming

04 · Fast & Slow Pointers 2

2 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
234Palindrome Linked ListEasy79Linked List, Two Pointers, Stack, Recursion
141Linked List CycleEasy79Hash Table, Linked List, Two Pointers, Floyd's Cycle Finding Algorithm

05 · LinkedList In-place Reversal 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
138Copy List with Random PointerMedium79Hash Table, Linked List

07 · Top 'K' Elements 2

2 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
23Merge k Sorted ListsHard79Linked List, Divide and Conquer, Heap (Priority Queue), Merge Sort, Tournament Sort
347Top K Frequent ElementsMedium79Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect

09 · Modified Binary Search 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
875Koko Eating BananasMedium100Array, Binary Search

13 · Matrix Traversal 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
200Number of IslandsMedium79Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix

14 · Backtracking 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
93Restore IP AddressesMedium100String, Backtracking

16 · Hash Map & Set 2

2 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
128Longest Consecutive SequenceMedium91Array, Hash Table, Union-Find
49Group AnagramsMedium79Array, Hash Table, String, Sorting

17 · Stack 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
622Design Circular QueueMedium79Array, Linked List, Design, Queue

18 · Greedy 3

2 solved on the pattern page (step-by-step explanation and a step-through player), 1 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
761Special Binary StringHard91String, Divide and Conquer, Sorting
1200Minimum Absolute DifferenceEasy79Array, Sorting
1328Break a PalindromeMedium79String, Greedy

19 · Trie & Design 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
146LRU CacheMedium91Hash Table, Linked List, Design, Doubly-Linked List

20 · Shortest Path & MST 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
743Network Delay TimeMedium79Depth-First Search, Breadth-First Search, Graph Theory, Heap (Priority Queue), Shortest Path, Dijkstra's Algorithm