Skip to content

AlexanderLu98/Leetcode-Templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode Templates

Overview

This repository contains templates for common algorithms and data structures used in Leetcode problems. The goal is to provide a starting point for solving problems efficiently.

Completed Templates

Linked List

  • Reverse
  • Floyd's Cycle Detection
    • Find middle
    • Cycle detection
    • Find the first element of the cycle
  • Merge

Sliding Window (Possibly redundant as they are more used as concepts in nature)

  • Fixed size
  • Variable size

Trees

  • Binary Search Tree (BST)
  • Preorder traversal
  • Inorder traversal
  • Postorder traversal
  • Level-order traversal
  • ZigZag-order traversal
  • Reverse Level-order traversal
  • Depth-First Search (DFS)
  • Breadth-First Search (BFS)

In Progress

  • Binary Search

TODO

High Priority

  • Backtracking
  • Graphs
  • Heap/Priority Queue

Medium Priority

  • Greedy Algorithms
  • Dynamic Programming (DP)
    • 1D DP
    • 2D DP
    • Multi-dimensional DP
  • Divide and Conquer
  • Sorting algorithms
  • Hashing
  • Two Pointers (Possibly redundant as they are more used as concepts in nature)
    • From opposite direction
    • From same direction
  • Stack
  • Queue
  • Array

Low Priority

  • Tries
  • Bit manipulation
  • Union Find

Future Plans

  • Create duplicates of templates with more comments and explanations for better understanding.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any suggestions or improvements.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages