# Data Structures and Algorithms

## main

- [Data Structures and Algorithms](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/undefined.md)
- [Algorithms Analysis](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/algorithms-analysis.md)
- [Measuring Resource Consumption](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/algorithms-analysis/measuring-resource-consumption.md)
- [Growth Rates](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/algorithms-analysis/growth-rates.md)
- [Asymptotic Notation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/algorithms-analysis/big-o-little-o-theta-omega-notation.md)
- [Analysis of Linear Search](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/algorithms-analysis/analysis-of-linear-search.md)
- [Analysis of Binary Search](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/algorithms-analysis/analysis-of-binary-search.md)
- [How to do an analysis in 5 steps](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/algorithms-analysis/how-to-do-an-analysis-in-5-steps.md)
- [Recursion](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/recursion.md)
- [Writing a recursive function](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/recursion/how-to-write-a-recursive-function.md)
- [How do recursive functions work?](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/recursion/how-do-recursive-functions-work.md)
- [Analysis of a Recursive Function](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/recursion/analysis-of-a-recursive-function.md)
- [Drawbacks of Recursion and Caution](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/recursion/drawbacks-of-recursion-and-caution.md)
- [Lists](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/lists.md)
- [Implementation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/lists/implementation.md)
- [Linked List](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/lists/linked-list.md)
- [Concepts](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/lists/linked-list/implementation.md)
- [Implementation - List and Nodes](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/lists/linked-list/implementation-list-and-nodes.md)
- [Implementation - push\_front(), pop\_front()](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/lists/linked-list/c++-implementation.md)
- [Implementation - Iterators](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/lists/linked-list/implementation-iterators.md)
- [Modification - Sentinel Nodes](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/lists/linked-list/modification-sentinel-nodes.md)
- [Stacks and Queues](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/stacks-and-queues.md)
- [Stack Implementation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/stacks-and-queues/stack-implementation.md)
- [Queue Implementation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/stacks-and-queues/queue-implementation.md)
- [Table](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/table.md)
- [A Simple Implementation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/table/a-simple-implementation.md)
- [Hash Tables](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/table/hash-tables.md)
- [Bucketing](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/table/hash-tables/bucketing.md)
- [Chaining](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/table/hash-tables/chaining.md)
- [Linear Probing](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/table/hash-tables/untitled-1-2.md)
- [Sorting](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/sorting.md)
- [Simple Sorts](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/sorting/simple-sorts.md)
- [Bubble Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/sorting/simple-sorts/the-simple-sorts.md)
- [Insertion Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/sorting/simple-sorts/insertion-sort.md)
- [Selection Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/sorting/simple-sorts/selection-sort.md)
- [Merge Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/sorting/merge-sort.md)
- [Quick Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/sorting/quick-sort.md)
- [Heap and Heap Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/sorting/heap-and-heap-sort.md)
- [Priority Queues using Binary Heaps](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/sorting/heap-and-heap-sort/priority-queues-using-binary-heaps.md)
- [Heapify and Heap Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/sorting/heap-and-heap-sort/heap-sort.md)
- [Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/definitions.md)
- [Binary Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/definitions/tree-implementation.md)
- [Binary Search Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/definitions/binary-search-trees.md)
- [BST Implemenation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/definitions/linked-list-implementation.md)
- [Iterative Methods](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/definitions/implementation-of-bst.md)
- [Recursive Methods](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/definitions/recursive-methods.md)
- [AVL Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/avl-trees.md)
- [Red Black Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/red-black-trees.md)
- [2-3 Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/2-3-trees.md)
- [Graphs](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/graphs.md)
- [Introduction to Computational Theory](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/theory-of-computation.md)
- [Appendix: Markdown](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/appendix-markdown.md)
- [Appendix: Mathematics Review](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/main/untitled.md)

## Primary version

- [Data Structures and Algorithms](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/master.md)
- [Algorithms Analysis](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/algorithms-analysis.md)
- [Measuring Resource Consumption](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/algorithms-analysis/measuring-resource-consumption.md)
- [Growth Rates](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/algorithms-analysis/growth-rates.md)
- [Asymptotic Notation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/algorithms-analysis/big-o-little-o-theta-omega-notation.md)
- [Analysis of Linear Search](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/algorithms-analysis/analysis-of-linear-search.md)
- [Analysis of Binary Search](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/algorithms-analysis/analysis-of-binary-search.md)
- [How to do an analysis in 5 steps](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/algorithms-analysis/how-to-do-an-analysis-in-5-steps.md)
- [Recursion](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/recursion.md)
- [Writing a recursive function](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/recursion/how-to-write-a-recursive-function.md)
- [How do recursive functions work?](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/recursion/how-do-recursive-functions-work.md)
- [Analysis of a Recursive Function](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/recursion/analysis-of-a-recursive-function.md)
- [Drawbacks of Recursion and Caution](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/recursion/drawbacks-of-recursion-and-caution.md)
- [Lists](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/lists.md)
- [Implementation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/lists/implementation.md)
- [Linked List](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/lists/linked-list.md)
- [Concepts](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/lists/linked-list/implementation.md)
- [Implementation - List and Nodes](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/lists/linked-list/implementation-list-and-nodes.md)
- [Implementation - push\_front(), pop\_front()](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/lists/linked-list/c++-implementation.md)
- [Implementation - Iterators](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/lists/linked-list/implementation-iterators.md)
- [Modification - Sentinel Nodes](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/lists/linked-list/modification-sentinel-nodes.md)
- [Stacks and Queues](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/stacks-and-queues.md)
- [Stack Implementation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/stacks-and-queues/stack-implementation.md)
- [Queue Implementation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/stacks-and-queues/queue-implementation.md)
- [Table](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/table.md)
- [A Simple Implementation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/table/a-simple-implementation.md)
- [Hash Tables](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/table/hash-tables.md)
- [Bucketing](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/table/hash-tables/bucketing.md)
- [Chaining](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/table/hash-tables/chaining.md)
- [Linear Probing](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/table/hash-tables/untitled-1-2.md)
- [Sorting](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/sorting.md)
- [Simple Sorts](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/sorting/simple-sorts.md)
- [Bubble Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/sorting/simple-sorts/the-simple-sorts.md)
- [Insertion Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/sorting/simple-sorts/insertion-sort.md)
- [Selection Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/sorting/simple-sorts/selection-sort.md)
- [Merge Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/sorting/merge-sort.md)
- [Quick Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/sorting/quick-sort.md)
- [Heap and Heap Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/sorting/heap-and-heap-sort.md)
- [Priority Queues using Binary Heaps](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/sorting/heap-and-heap-sort/priority-queues-using-binary-heaps.md)
- [Heapify and Heap Sort](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/sorting/heap-and-heap-sort/heap-sort.md)
- [Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/definitions.md)
- [Binary Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/definitions/tree-implementation.md)
- [Binary Search Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/definitions/binary-search-trees.md)
- [BST Implemenation](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/definitions/linked-list-implementation.md)
- [Iterative Methods](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/definitions/implementation-of-bst.md)
- [Recursive Methods](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/definitions/recursive-methods.md)
- [AVL Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/avl-trees.md)
- [Red Black Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/red-black-trees.md)
- [2-3 Trees](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/2-3-trees.md)
- [Graphs](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/graphs.md)
- [Introduction to Computational Theory](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/theory-of-computation.md)
- [Appendix: Markdown](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/appendix-markdown.md)
- [Appendix: Mathematics Review](https://catherine-leung.gitbook.io/data-strutures-and-algorithms/untitled.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information, you can query the documentation dynamically by asking a question.
Perform an HTTP GET request on a page URL with the `ask` query parameter:
```
GET https://catherine-leung.gitbook.io/data-strutures-and-algorithms/master.md?ask=<question>
```
The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.
Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
