It is a great learning project where you will find out various algo-problems having multiple different solutions in your favorite language (Javascript).
If you want to contribute, will be highly appreciated. PRs accepted. Contributor must update the README.md with every PR, with some brief overview of the problem and solutions.
a.) Quick Find b.) Quick Union c.) Weighted Quick Union d.) Path Compression Union Improvement
9. Anagrams
11. Capitalization
12. Chunk
14. Find Pair
15. Fizz Buzz
16. Matrix
20. Palindrome
22. Pyramid
23. Roman To Int
24. Steps
27. Vowels
28. Word Ladder
1. Merge Sort
2. Quick Sort
3. Bubble Sort
6. Use Cases
means the space taken by the whole algorithm, not the space taken up by the inputs
3. Array and objects ( reference types) requires O(n) space (where for array n is length, number of keys for objects)
2. O(log n) - Searching Algorithm have this, Efficient Sorthing Algorithm have this & Recursion some time have space complexity in log
- When you don't need order.
- When you need fast access/insertion and removal
Big(O) of objects
- Insertion - O(1)
- Removal - O(1)
- Searching - O(N)
- Access - O(1)
Big(O) of objects methods
- Object.keys - O(N)
- Object.values - O(N)
- Object.entries - O(N)
- Object.hasOwnProperty - O(1)
- When you need order.
- When you need fast access/insertion and removal
Big(O) of Arrays
- Insertion - It depends
- Removal - It depends
- Searching - O(N)
- Access - O(1)
Big(O) of Array methods
- push - O(1)
- pop - O(1)
- shift - O(N)
- unshift - O(N)
- concat - O(N)
- slice - O(N)
- splice - O(N)
- sort - O(n log n)
- foreach/map/filter/reduce etc - O(N)