View Code? Open in Web Editor
NEW
A repository to keep track of Data Structures and Algorithm learnings
JavaScript 46.62%
C# 53.38%
dsa's Introduction
Data Structures and Algorithms
- During lookups
- During push/pop
- Ordered
- During inserts
- During deletes
- Fixed size arrays
- During lookups - only if hash collision is adjusted for
- Fast inserts
- Flexible keys
- Ordering - because Hash tables are unordered by default
- Key iteration - because key iteration is very slow
- Fast inserts
- Fast deletes
- Ordered
- Flexible size
- Slow lookups
- Consumes more memory
- Fast operations
- Fast peek
- Ordered
- Better than O(n)
- Flexible size
- Ordered
- Better than O(n)
- Priority
- Flexible size
- Fast insert
- DRY (Don't Repeat Yourself) - enable reusability
- Readability
- Large stack
- Space complexity
Breadth-first Search (BFS)
- Shortest path
- Closer nodes
- Space complexity - takes more memory
- Lesser memory
- Asks a question of "Does the path exist from one node to the other"
- Time complexity - can get slow
dsa's People
Contributors
Watchers