Skip to content

mjacquot1/algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

algorithms

My notes and cheat sheets for algorithms.

Arrays/Strings

  1. If it says longest/shortest of sub string/array, its a sliding window problem
  2. If it says "Pattern of length k", its a sliding window problem
  3. Buy/Sell stock is a sliding window problem
  4. If it says "find more than 2 values that equal x" its probably a 2 pointer
  5. Two pointers usually starts at (l_point, r_point = 0, len(arr)-1). But not always
  6. (array_1.extend(array_2)) is much faster than (array_1 = array_1 + array_2)

Graphs

  1. If it says "nodes from 0 to n", consider Union Joins.

About

My notes and cheat sheets for algorithms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages