- Notifications
You must be signed in to change notification settings - Fork0
A curated list of 160+ leetcode questions grouped by their common patterns
License
techhubgit/leetcode-patterns
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- Background
- Preface
- Notes
- Question List
- Solutions
- Leetcode Discuss
- Tips to Consider
- Suggestions
- Acknowledgements
This repo is intended for any individual wanting to improve their problemsolving skills for software engineering interviews.
Problems are grouped under their respective subtopic, in order to focus onrepeatedly applying common patterns rather than randomly tackling questions.
All questions are available onleetcode.com with some requiringleetcode premium.
It is highly recommended to read chapters 1, 2, 3, 4, 8, and 10 ofCracking The Coding Interviewto familiarize yourself with the following data structures and their operations:
- Arrays
- Maps
- Linked Lists
- Queues
- Heaps
- Stacks
- Trees
- Graphs
In addition, you should have a good grasp on common algorithms such as:
- Breadth-first search
- Depth-first search
- Binary search
- Recursion
This pdf contains useful information for the built-in data structures in Java.
Other useful methods to know includesubstring()
,toCharArray()
,Math.max()
,Math.min()
, andArrays.fill()
.
The entire question list can be found here:https://seanprashad.com/leetcode-patterns/.
In addition to viewing the question list, companies that have previously askedthe question in the past 6 months (as of January 2020) will be listed. You canalso use the checkboxes to mark which questions you've completed!
Solutions written in Java can be found in thesolutions branch.
Leetcode discuss is an amazing resource and features previous interviewquestions, as well as compensation and general career advice.
If input array is sorted then - Binary search - Two pointersIf asked for all permutations/subsets then - BacktrackingIf given a tree then - DFS - BFSIf given a graph then - DFS - BFSIf given a linked list then - Two pointersIf recursion is banned then - StackIf asked for maximum/minumum subarray/subset/options then - Dynamic programmingIf asked for top/least K items then - HeapIf asked for common strings then - Map - TrieElse - Map/Set for O(1) time & O(n) space - Sort input for O(nlogn) time and O(1) space
Think a question should/shouldn't be included? Wish there was another feature?Feel free to open anissue with your suggestion!
This list is heavily inspired fromGrokking the Coding Interview withadditional problems extracted from theBlind 75 list and this medium articleon14 patterns to ace any coding interview question.
About
A curated list of 160+ leetcode questions grouped by their common patterns
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- JavaScript96.7%
- SCSS2.4%
- HTML0.9%