Learn through design decisions
Smart Search Autocomplete
Build a Trie that shares prefixes, ranks matching terms by selection frequency and prunes unused nodes after deletion.
- Trie insertion and prefix navigation
- DFS collection plus ranked results
- Deletion without damaging shared prefixes
Least Recently Used Cache
Combine a hash table and doubly linked list for fast lookup, recency updates and capacity-based eviction.
- O(1) average key lookup
- MRU/LRU pointer maintenance
- Eviction and memory ownership
Campus Route Planner
Represent a campus as a weighted graph, find the shortest walk and recalculate routes when roads close.
- Weighted adjacency matrix
- Dijkstra relaxation and predecessors
- Dynamic road-availability updates
Follow the engineering cycle
1. Analyse
Convert the story into operations, constraints and edge cases.
2. Model
Compare candidate structures and record the selection reason.
3. Implement
Preserve invariants while handling memory and invalid input.
4. Validate
Trace state, test boundaries and justify complexity.
Created for this learning path
The scenarios, explanations, traces, questions, test designs and source programs in this package were written specifically for CodeBhavya. The named algorithms, C language rules, mathematical notation and data-structure terminology are standard academic knowledge.
