{
    "api": "YAML JSON TOON Database",
    "version": "1.0.0",
    "format": "json",
    "category": {
        "id": 3,
        "slug": "data-structures",
        "name": "Data Structures",
        "description": "Fundamental data structures with properties and complexity analysis.",
        "icon": "layers",
        "created_at": 1783090350,
        "topic": {
            "overview": "Data-structure reference data describes how information is organized in memory so that operations are fast: arrays, linked lists, hash tables, trees, heaps and graphs, plus the specialized structures built for particular problems (probabilistic filters, spatial indexes, concurrent containers) and the algorithms that run on them. The usual comparison is by time and space complexity in Big-O terms, which says how cost grows with input size and ignores constants, caches and implementation quality. Choosing a structure means matching its strong operations to the program's access pattern.",
            "key_ideas": [
                {
                    "term": "Big-O",
                    "meaning": "A notation for how an operation's cost grows with input size n, ignoring constant factors. O(1) is constant, O(log n) logarithmic, O(n) linear, O(n^2) quadratic."
                },
                {
                    "term": "Amortized cost",
                    "meaning": "The average cost per operation over a sequence, even when some single operations are expensive, as with appending to a dynamic array."
                },
                {
                    "term": "Balanced tree",
                    "meaning": "A search tree that keeps its height near log n by rebalancing, so lookups, insertions and deletions stay logarithmic."
                },
                {
                    "term": "Hash table",
                    "meaning": "A structure that maps keys to buckets by a hash function, giving average O(1) lookup, with collisions handled by chaining or open addressing."
                },
                {
                    "term": "Heap",
                    "meaning": "A tree-based structure that keeps the minimum or maximum at the root, the basis of priority queues."
                },
                {
                    "term": "Graph",
                    "meaning": "A set of nodes and edges, stored as an adjacency list (sparse graphs) or matrix (dense graphs)."
                },
                {
                    "term": "Probabilistic data structure",
                    "meaning": "A compact structure that answers membership or counting queries approximately, trading a bounded error for much less space."
                }
            ],
            "pitfalls": [
                "Quoting average-case complexity as the guaranteed bound. Hash tables and quicksort have worse worst cases.",
                "Ignoring constants and cache behavior: an array often beats a linked list in practice even when Big-O suggests otherwise.",
                "Using a structure whose strong operation is not the one your program performs most.",
                "Forgetting that probabilistic structures can give false positives (Bloom filters) or approximate counts."
            ],
            "agent_tips": [
                "State the operation, the structure and the case (best, average or worst) when quoting a complexity.",
                "Ask what operations dominate and how large the data is before recommending a structure.",
                "Mention the standard-library equivalent in the user's language (for example HashMap, dict, TreeMap) with the structure name."
            ],
            "start_with": [
                "complexity-analysis",
                "hash-tables"
            ]
        }
    },
    "datasets": [
        {
            "id": 1,
            "slug": "advanced-graph-algorithms",
            "title": "Advanced Graph Algorithms",
            "description": "Advanced graph algorithms: strongly connected components (Tarjan's, Kosaraju's), max flow (Ford-Fulkerson, Edmonds-Karp, Dinic), matching, and graph coloring.",
            "tags": "graphs,algorithms,max-flow,matching,strongly-connected-components,graph-coloring,ford-fulkerson",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 8,
            "summary": "Advanced graph algorithms: strongly connected components (Tarjan, Kosaraju), maximum flow (Ford-Fulkerson, Edmonds-Karp, Dinic), bipartite matching (Hopcroft-Karp), greedy coloring and negative-cycle detection, each with type, time, space, uses and notes."
        },
        {
            "id": 2,
            "slug": "concurrent-data-structures",
            "title": "Concurrent Data Structures",
            "description": "Thread-safe data structures: concurrent hash maps, skip lists, queues, stacks, read-write locks, lock-free algorithms, and compare-and-swap patterns.",
            "tags": "concurrency,lock-free,compare-and-swap,concurrent-hash-map,concurrent-queue,read-write-lock,atomic",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 8,
            "summary": "Data structures designed for concurrent access: striped hash maps, skip lists, lock-free queues and stacks, read-write locks, compare-and-swap and safe memory reclamation with hazard pointers and epochs, each with implementations, contention and notes."
        },
        {
            "id": 3,
            "slug": "complexity-analysis",
            "title": "Data Structure Complexity Analysis",
            "description": "Time and space complexity analysis of common data structures: Array, Linked List, Binary Search Tree, Hash Table, Heap, and Graph with Big-O notation.",
            "tags": "algorithms,complexity,big-o,data structures",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 15,
            "summary": "Time and space complexity of basic operations (access, search, insertion, deletion) for the core data structures: arrays, linked lists, binary search trees, hash tables, heaps and graphs, extended with stacks, queues, dynamic arrays, balanced trees, tries and skip lists."
        },
        {
            "id": 4,
            "slug": "graph-algorithms",
            "title": "Graph Algorithms",
            "description": "Essential graph algorithms: traversals (BFS, DFS), shortest path (Dijkstra, Bellman-Ford), minimum spanning tree (Prim, Kruskal), topological sort, and network flow.",
            "tags": "graphs,algorithms,bfs,dfs,dijkstra,mst,topological-sort,network-flow",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 10,
            "summary": "Essential graph algorithms with category, time and space complexity, description, use cases, pseudocode and notes: BFS, DFS, Dijkstra, Bellman-Ford, Floyd-Warshall, Prim, Kruskal, topological sort, union-find and Ford-Fulkerson, plus graph representations."
        },
        {
            "id": 5,
            "slug": "hash-tables",
            "title": "Hash Tables & Hash Functions",
            "description": "Hash table implementations, collision resolution strategies, hash functions, load factor, and performance characteristics.",
            "tags": "hash-tables,dictionaries,associative-arrays,collision-resolution,hashing",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 6,
            "summary": "How hash tables work: hash functions, load factor and collision resolution by chaining or open addressing, the common hash table types in programming languages, and design considerations for choosing a hash function and avoiding collisions."
        },
        {
            "id": 6,
            "slug": "bloom-filters-probabilistic",
            "title": "Probabilistic Data Structures: Bloom Filters & Beyond",
            "description": "Probabilistic data structures for approximate set membership, counting, and cardinality estimation: Bloom filters, Count-Min Sketch, HyperLogLog, and Cuckoo filters.",
            "tags": "bloom-filter,probabilistic,data-structures,hyperloglog,cuckoo-filter,count-min-sketch",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 6,
            "summary": "Probabilistic data structures for membership, counting and similarity: Bloom, counting Bloom and cuckoo filters, HyperLogLog, Count-Min Sketch and MinHash, each with space use, error behavior, operations, strengths, weaknesses and uses."
        },
        {
            "id": 7,
            "slug": "sorting-algorithms-comparison",
            "title": "Sorting Algorithms Comparison",
            "description": "Time and space complexity comparison of sorting algorithms: Bubble, Selection, Insertion, Merge, Quick, Heap, Counting, and Radix Sort with stability notes.",
            "tags": "algorithms,sorting,complexity,big-o",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 12,
            "summary": "A comparison of sorting algorithms by best, average and worst time, space and stability: bubble, selection, insertion, merge, quick, heap, counting and radix sort, extended with Timsort, introsort, bucket sort and shell sort."
        },
        {
            "id": 8,
            "slug": "spatial-data-structures",
            "title": "Spatial Data Structures",
            "description": "Spatial indexing structures for multi-dimensional data: k-d trees, R-trees, quadtrees, octrees, grid files, and space-filling curves (Z-order, Hilbert).",
            "tags": "spatial,kd-tree,rtree,quadtree,octree,space-filling-curves,geospatial,nearest-neighbor",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 7,
            "summary": "Data structures for multidimensional and geographic data: k-d trees, R-trees, quadtrees, octrees, grid files and the Z-order and Hilbert space-filling curves, each with dimensions, query time, space, operations, uses and notes."
        },
        {
            "id": 9,
            "slug": "string-algorithms",
            "title": "String Algorithms and Pattern Matching",
            "description": "String processing algorithms: KMP, Rabin-Karp, Z-algorithm, suffix trees/arrays, Aho-Corasick, and edit distance (Levenshtein).",
            "tags": "strings,pattern-matching,kmp,rabin-karp,z-algorithm,suffix-tree,aho-corasick,levenshtein",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 7,
            "summary": "String algorithms and the structures behind them: KMP, Rabin-Karp, the Z-algorithm, suffix trees and arrays, Aho-Corasick and Levenshtein edit distance, each with type, time, space, description, uses and notes."
        },
        {
            "id": 10,
            "slug": "tree-data-structures",
            "title": "Tree Data Structures",
            "description": "Complete reference of tree data structures: binary trees, BST, AVL, Red-Black, B-trees, B+ trees, segment trees, and trie.",
            "tags": "trees,bst,avl,red-black,b-tree,trie,data-structures,algorithms",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 8,
            "summary": "Tree data structures with type, properties, uses and notes: binary trees, binary search trees, AVL and red-black trees, B-trees and B+ trees, tries and segment trees, plus a complexity comparison of balanced trees."
        }
    ]
}
