Skip to content

realmelan/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

138 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knowledge

  • Binary search Invariant, to guarantee correct loop exit condition and return value
  • Monotonic Queue/Stack, to find maximum/minimum element or nearest larger/smaller element
  • Union-Find, to group elements
  • Binary tree traversal, recursive/non-recursive
  • Permutation/Combination, one position at a time
  • Breadth first search, to find optimized value of search
  • Depth first search, to find one solution
  • Sliding window, to move two pointers to locate subarray or subsequence that meet conditions
  • Trie, a tree structure to efficiently search a pattern or match
  • Topological sort, to find elements that meet conditions iteratively.
  • Virtual indexing, access rotated array or wiggle sequence
  • Binary Indexed Tree, to achieve log(n) update/lookup functionality
  • KMP, to find longest proper prefix
  • Knuth's next permunation, to find next larger permutation
  • Floyd-Warshall algorithm, to compute shortest distance of any pair within a graph
  • Dijkstra algorithm, to compute shortest distance from given node to any other nodes within a graph, priority queue can be used to get next nearest node.
  • Game on graphs, a two-player game, both play optimally. starting from winning/losing states, and reverse back to unknown states, using topological sort.
  • Difference Array

Miscellaneous

Ref

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages