DSA CheatSheet 1669861526
DSA CheatSheet 1669861526
DSA CheatSheet 1669861526
structure cheat
sheet
Arrays, strings, linked lists, stacks & queues,
trees, graphs, maps, and heaps
Time complexity:
Strings
(n = shorter string length)
Algorithm complexity:
Time Complexity Space
Complexity
Worst Case Average Best Case
Case
Algorithm Complexity:
Linked
Access (Skip List) O(n) O(log n) O(log n)
O(n)
O(log n)
O(log n)
O(log n)
O(log n)
(Space-time complexity)
Algorithm Complexity:
(Space-time complexity)
Algorithm Complexity:
Graphs
Remove Edge Adjacency List O(V) O(V) O(V)
Algorithm Complexity:
Maps
Search (TreeMap) O(log n) O(log n) O(1)
(Space-time complexity)
Algorithm Complexity: