Binary Search - Recursive
Binary Search - Iterative(In order)
Count word occurence
1. set text in string 2. create treemap to hold words as key & value (k, v) 3. create string array to split text 4. for loop to go through word array and add into key string 5. if map contains key(the word) then put (key, 1) into map 6. go onto next word, if word is already added to map, then increase value >> (key, value + 1) 7. continue through text 8. display for each map (key + final value) in alpha order ans: (AGAIN, 1) (LEFT, 1) (RIGHT, 2) (THEN, 2) (TURN, 1) |
DFS + BFS
V & E- # Vertices & Edges H - max height of tree L - max # nodes in a single level |
Cheatography
https://cheatography.com
Data Structures and Algorithms Cheat Sheet (DRAFT) by drenmaster
Data Structures and Algorithms
This is a draft cheat sheet. It is a work in progress and is not finished yet.