← CodeClarityLab Home
Browse by Category
+ added · updated 7d
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Trie (Prefix Tree)
A tree where each node represents a character — paths from root to leaf spell out keys, enabling O(m) lookup, prefix search, and autocomplete where m is key length, independent of dataset size.
1mo ago data_structures intermediate
Adjacency Matrix vs Adjacency List
Two ways to represent a graph — adjacency matrix (2D array, O(1) edge lookup, O(V²) space) vs adjacency list (array of lists, O(V+E) space, better for sparse graphs).
2mo ago data_structures intermediate
Circular Buffer / Ring Buffer PHP 5.0+
A fixed-size array treated as circular — the write pointer wraps around when it reaches the end, overwriting the oldest data. Used for logs, audio streaming, and producer-consumer queues.
2mo ago data_structures intermediate
Graphs
A collection of nodes (vertices) connected by edges — directed or undirected, weighted or unweighted. The most general data structure, modelling networks, dependencies, and relationships.
2mo ago data_structures intermediate
Diagram: Binary Trees Binary Trees PHP 5.0+
A hierarchical structure where each node has at most two children — Binary Search Trees enable O(log n) search, while balanced variants (AVL, Red-Black) guarantee it.
2mo ago data_structures intermediate
Diagram: Hash Table Hash Table PHP 5.0+
A data structure that maps keys to values using a hash function, providing amortised O(1) average-case lookups, insertions, and deletions.
2mo ago data_structures intermediate
Diagram: Heaps & Priority Queues Heaps & Priority Queues PHP 5.3+
A tree-based structure satisfying the heap property — min-heap: parent ≤ children; max-heap: parent ≥ children — enabling O(1) peek and O(log n) insert/extract for priority queues.
2mo ago data_structures intermediate
✓ schema.org compliant