All Projects → SeanPrashad → Leetcode Patterns

SeanPrashad / Leetcode Patterns

Licence: gpl-3.0
A curated list of leetcode questions grouped by their common patterns

Programming Languages

javascript
184084 projects - #8 most used programming language
SCSS
7915 projects
HTML
75241 projects

Projects that are alternatives of or similar to Leetcode Patterns

Algorithms Leetcode Javascript
Algorithms resolution in Javascript. Leetcode - Geeksforgeeks - Careercup
Stars: ✭ 157 (-95.81%)
Mutual labels:  algorithms, data-structures, interview-questions, leetcode
Leetcode In Swift
My solutions to LeetCode problems written in Swift
Stars: ✭ 150 (-96%)
Mutual labels:  algorithms, data-structures, interview-questions, leetcode
Datastructures Algorithms
The best library for implementation of all Data Structures and Algorithms - Trees + Graph Algorithms too!
Stars: ✭ 2,105 (-43.87%)
Mutual labels:  algorithms, data-structures, leetcode, interview-prep
Competitiveprogrammingquestionbank
This repository contains all the popular competitive programming and DSA questions with solutions.
Stars: ✭ 122 (-96.75%)
Mutual labels:  algorithms, data-structures, interview-questions, leetcode
Interviews
Everything you need to know to get the job.
Stars: ✭ 54,875 (+1363.33%)
Mutual labels:  algorithms, interview-questions, leetcode, interview-prep
Interviewguide
《大厂面试指北》——包括Java基础、JVM、数据库、mysql、redis、计算机网络、算法、数据结构、操作系统、设计模式、系统设计、框架原理。最佳阅读地址:http://notfound9.github.io/interviewGuide/
Stars: ✭ 3,117 (-16.88%)
Mutual labels:  algorithms, data-structures, interview-questions, leetcode
Technical Interview Guide
My learning material for technical interviews!
Stars: ✭ 76 (-97.97%)
Mutual labels:  algorithms, data-structures, interview-questions, interview-prep
Awesome Coding Interview Question Patterns
The most common question-patterns for any coding-interview
Stars: ✭ 196 (-94.77%)
Mutual labels:  algorithms, data-structures, interview-questions, interview-prep
Fucking Algorithm
刷算法全靠套路,认准 labuladong 就够了!English version supported! Crack LeetCode, not only how, but also why.
Stars: ✭ 99,705 (+2558.8%)
Mutual labels:  algorithms, data-structures, interview-questions, leetcode
Algorithmic Pseudocode
This repository contains the pseudocode(pdf) of various algorithms and data structures necessary for Interview Preparation and Competitive Coding
Stars: ✭ 519 (-86.16%)
Mutual labels:  algorithms, data-structures, interview-questions, leetcode
Java
Repository for Java codes and algos.Star the repo too.
Stars: ✭ 53 (-98.59%)
Mutual labels:  algorithms, data-structures, interview-questions
Leetcode Python
Leetcode Python Solution and Explanation. Also a Guide to Prepare for Software Engineer Interview.
Stars: ✭ 1,088 (-70.99%)
Mutual labels:  algorithms, data-structures, leetcode
Ctci 6th Edition
Cracking the Coding Interview 6th Ed. Solutions
Stars: ✭ 9,328 (+148.75%)
Mutual labels:  algorithms, data-structures, interview-questions
Coding Challenges
solutions to coding challenges and algorithm and data structure building blocks
Stars: ✭ 28 (-99.25%)
Mutual labels:  algorithms, data-structures, interview-questions
Leetcode
👏🏻 leetcode solutions for Humans™
Stars: ✭ 1,129 (-69.89%)
Mutual labels:  algorithms, interview-questions, leetcode
Play With Algorithm Interview
Codes of my MOOC Course <Play with Algorithm Interviews>. Updated contents and practices are also included. 我在慕课网上的课程《玩儿转算法面试》示例代码。课程的更多更新内容及辅助练习也将逐步添加进这个代码仓。
Stars: ✭ 915 (-75.6%)
Mutual labels:  algorithms, interview-questions, leetcode
Ctci 6th Edition Php
Cracking the Coding Interview 6th Ed. PHP Solutions
Stars: ✭ 76 (-97.97%)
Mutual labels:  algorithms, data-structures, interview-questions
Hello Algorithm
🌍 针对小白的算法训练 | 包括四部分:①.算法基础 ②.力扣图解 ③.大厂面经 ④.CS_汇总 | 附:1、千本开源电子书 2、百张技术思维导图(项目花了上百小时,希望可以点 star 支持,🌹感谢~)
Stars: ✭ 29,372 (+683.25%)
Mutual labels:  algorithms, interview-questions, leetcode
Coding Ninjas Data Structures And Algorithms In Python
Solved problems and assignments of DSA course taught by Coding Ninjas team
Stars: ✭ 70 (-98.13%)
Mutual labels:  algorithms, data-structures, interview-questions
Leetcode Sol Res
Clean, Understandable Solutions and Resources for LeetCode Online Judge Algorithm Problems.
Stars: ✭ 1,647 (-56.08%)
Mutual labels:  algorithms, interview-questions, leetcode

Leetcode Patterns

Table of Contents

Background

This repo is intended for any individual wanting to improve their problem solving skills for software engineering interviews.

Problems are grouped under their respective subtopic, in order to focus on repeatedly applying common patterns rather than randomly tackling questions.

All questions are available on leetcode.com with some requiring leetcode premium.

Preface

It is highly recommended to read chapters 1, 2, 3, 4, 8, and 10 of Cracking The Coding Interview to 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

Notes

This pdf contains useful information for the built-in data structures in Java.

Other useful methods to know include substring(), toCharArray(), Math.max(), Math.min(), and Arrays.fill().

Question List

The entire question list can be found here: https://seanprashad.com/leetcode-patterns/.

In addition to viewing the question list, companies that have previously asked the question in the past 6 months (as of May 2021) will be listed. You can also use the checkboxes to mark which questions you've completed!

Solutions

Solutions written in Java can be found in the solutions branch.

Leetcode Discuss

Leetcode discuss is an amazing resource and features previous interview questions, as well as compensation and general career advice.

Tips to Consider

If input array is sorted then
    - Binary search
    - Two pointers

If asked for all permutations/subsets then
    - Backtracking

If given a tree then
    - DFS
    - BFS

If given a graph then
    - DFS
    - BFS

If given a linked list then
    - Two pointers

If recursion is banned then
    - Stack

If must solve in-place then
    - Swap corresponding values
    - Store one or more different values in the same pointer

If asked for maximum/minumum subarray/subset/options then
    - Dynamic programming

If asked for top/least K items then
    - Heap

If asked for common strings then
    - Map
    - Trie

Else
    - Map/Set for O(1) time & O(n) space
    - Sort input for O(nlogn) time and O(1) space

Suggestions

Think a question should/shouldn't be included? Wish there was another feature? Feel free to open an issue with your suggestion!

Acknowledgements

This list is heavily inspired from Grokking the Coding Interview with additional problems extracted from the Blind 75 list and this medium article on 14 patterns to ace any coding interview question.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].