Skip to content

WT-Dougherty/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeetCode 150 — Checklist & Table of Contents

Total problems: 151

Check items as you complete them. Each link opens that problem’s problem.md inside this repo.

Arrays And Hashing (9)

Some Notes on This Section: Hash maps provide constant time element lookup; you can check that you have come across specific elements in constant time. If counting element frequency, use a hash map. If you're checking element existence, use a set (also hashed elements, so constant time lookup)

Two Pointers (5)

Some Notes on This Section: Two pointer problems typically start with pointers on opposite edges of the iterable object. You typically initialize both of the pointers to the start of the iterable object when you're doing a sliding window problem.

With this in mind, it's always best to start by trying to define your subproblem as some vertical slice of the interable object, or by the edges defined by the pointers. The "Trapping Rain Water" problem really tested my problem solving ability. Only when I clearly defined a bucket as some elevation < both edges did the solution start to formulate.

Sliding Window (6)

Stack (7)

Binary Search (7)

Linked List (11)

Trees (15)

Tries (3)

Heap / Priority Queue (7)

Backtracking (9)

Graphs (13)

Some Notes on This Section: Always opt for DFS when you have a choice in traversal problems. You can use the recursion stack to order your traversal, as opposed to having to maintain some queue for BFS. If you're given a set of (bi)directional relations (edges) between objects, you can probably solve the problem efficiently using graph traversal.

the defaultdict type from the collections library is helpful when creating adjacency lists. Pass list type to the constructor to specify adjacency list.

Advanced Graphs (6)

1D Dynamic Programming (12)

2D Dynamic Programming (11)

Greedy (8)

Intervals (6)

Math & Geometry (7)

Bit Manipulation (9)

About

The NeetCode 150

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages