diff --git a/content/roadmaps/103-computer-science/content/114-tries.md b/content/roadmaps/103-computer-science/content/114-tries.md index 8ab6d1f02..e7c74de9f 100644 --- a/content/roadmaps/103-computer-science/content/114-tries.md +++ b/content/roadmaps/103-computer-science/content/114-tries.md @@ -1 +1,14 @@ -# Tries \ No newline at end of file +# Tries + +Tries are a data structure that can be used to store strings. The idea is to store the characters of the string in a tree-like structure, where each node of the tree represents a single character. We can use this structure to store strings in a way that allows us to quickly search for strings with a common prefix. + +Free Content +Tries - DataStructure Notes +The Trie: A Neglected Data Structure +TopCoder - Using Tries +Stanford Lecture (real world use case) +MIT, Advanced Data Structures, Strings (can get pretty obscure about halfway through) +0. Tries - Coursera +1. R Way Tries +2. Ternary Search Tries +3. Character Based Operations diff --git a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/100-avl-trees.md b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/100-avl-trees.md index 2947b43f3..7872a48d9 100644 --- a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/100-avl-trees.md +++ b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/100-avl-trees.md @@ -1 +1,11 @@ -# Avl trees \ No newline at end of file +# AVL Trees + +AVL trees are a type of self-balancing binary search tree. They are named after their inventors, Adelson-Velskii and Landis. AVL trees are the most popular self-balancing binary search tree. + +In practice: From what I can tell, these aren't used much in practice, but I could see where they would be: The AVL tree is another structure supporting O(log n) search, insertion, and removal. It is more rigidly balanced than red–black trees, leading to slower insertion and removal but faster retrieval. This makes it attractive for data structures that may be built once and loaded without reconstruction, such as language dictionaries (or program dictionaries, such as the opcodes of an assembler or interpreter) + +Free Content +MIT AVL Trees / AVL Sort +AVL Trees +AVL Tree Implementation +Split And Merge diff --git a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/101-red-black-trees.md b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/101-red-black-trees.md index 07291ac3f..78f4aaadb 100644 --- a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/101-red-black-trees.md +++ b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/101-red-black-trees.md @@ -1 +1,14 @@ -# Red black trees \ No newline at end of file +# Red/Black Trees + +In computer science, a red–black tree is a kind of self-balancing binary search tree. Each node stores an extra bit representing "color", used to ensure that the tree remains balanced during insertions and deletions. + +These are a translation of a 2-3 tree (see below). + +In practice: Red–black trees offer worst-case guarantees for insertion time, deletion time, and search time. Not only does this make them valuable in time-sensitive applications such as real-time applications, but it makes them valuable building blocks in other data structures which provide worst-case guarantees; for example, many data structures used in computational geometry can be based on red–black trees, and the Completely Fair Scheduler used in current Linux kernels uses red–black trees. In the version 8 of Java, the Collection HashMap has been modified such that instead of using a LinkedList to store identical elements with poor hashcodes, a Red-Black tree is used. + +Free Content +Red-Black Tree - Wikipedia +An Introduction To Binary Search And Red Black Tree +Red-Black Trees (playlist) in 30 minutes +Aduni - Algorithms - Lecture 4 (link jumps to starting point) +Aduni - Algorithms - Lecture 5 diff --git a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/102-the-2-3-search-trees.md b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/102-the-2-3-search-trees.md index e9f483946..0b785445f 100644 --- a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/102-the-2-3-search-trees.md +++ b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/102-the-2-3-search-trees.md @@ -1 +1,10 @@ -# The 2 3 search trees \ No newline at end of file +# 2-3 Search Trees + +In practice: 2-3 trees have faster inserts at the expense of slower searches (since height is more compared to AVL trees). + +You would use 2-3 tree very rarely because its implementation involves different types of nodes. Instead, people use Red Black trees. + +Free Content +23-Tree Intuition and Definition +Binary View of 23-Tree +2-3 Trees (student recitation) diff --git a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/103-the-2-3-4-trees.md b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/103-the-2-3-4-trees.md index 7e5cc5350..d8f8fe5cb 100644 --- a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/103-the-2-3-4-trees.md +++ b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/103-the-2-3-4-trees.md @@ -1 +1,7 @@ -# The 2 3 4 trees \ No newline at end of file +# 2-3-4 Search Trees + +In practice: For every 2-4 tree, there are corresponding red–black trees with data elements in the same order. The insertion and deletion operations on 2-4 trees are also equivalent to color-flipping and rotations in red–black trees. This makes 2-4 trees an important tool for understanding the logic behind red–black trees, and this is why many introductory algorithm texts introduce 2-4 trees just before red–black trees, even though 2-4 trees are not often used in practice. + +CS 61B Lecture 26: Balanced Search Trees +Bottom Up 234-Trees +Top Down 234-Trees diff --git a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/104-n-ary-trees.md b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/104-n-ary-trees.md index 058eebbfc..92bb8a7c9 100644 --- a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/104-n-ary-trees.md +++ b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/104-n-ary-trees.md @@ -1 +1,10 @@ -# N ary trees \ No newline at end of file +# N-ary (K-ary, M-ary) Trees + +Note: the N or K is the branching factor (max branches) + +Binary trees are a 2-ary tree, with branching factor = 2 + +2-3 trees are 3-ary + +Free Content +K-Ary Tree diff --git a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/105-b-tree.md b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/105-b-tree.md index 7ab904c51..6f7254a57 100644 --- a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/105-b-tree.md +++ b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/105-b-tree.md @@ -1 +1,14 @@ -# B tree \ No newline at end of file +# B-Trees + +Fun fact: it's a mystery, but the B could stand for Boeing, Balanced, or Bayer (co-inventor). + +In Practice: B-Trees are widely used in databases. Most modern filesystems use B-trees (or Variants). In addition to its use in databases, the B-tree is also used in filesystems to allow quick random access to an arbitrary block in a particular file. The basic problem is turning the file block i address into a disk block (or perhaps to a cylinder-head-sector) address + +Free Content +B-Tree - Wikipedia +B-Tree Datastructure +Introduction to B-Trees +B-Tree Definition and Insertion +B-Tree Deletion +MIT 6.851 - Memory Hierarchy Models +B-Trees (playlist) in 26 minutes diff --git a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/readme.md b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/readme.md index ee42b65b3..c97826c9b 100644 --- a/content/roadmaps/103-computer-science/content/115-balanced-search-trees/readme.md +++ b/content/roadmaps/103-computer-science/content/115-balanced-search-trees/readme.md @@ -1 +1,9 @@ -# Balanced search trees \ No newline at end of file +# Balanced Search Trees + +Balanced search trees are a type of data structure that allow for fast insertion, deletion, and lookup of data. They are a type of self-balancing binary search tree, which means that they are a binary tree that maintains the binary search tree property while also keeping the tree balanced. This means that the tree is always approximately balanced, which allows for fast insertion, deletion, and lookup of data. + +Free Content +Self-balancing binary search tree - Wikipedia +Balanced Search Trees Operations and Applications 11 min +Balanced binary search tree rotations +