点击关注上方“知了小巷”,
设为“置顶或星标”,第一时间送达干货。
https://www.cs.usfca.edu/~galles/visualization/Algorithms.html
这里介绍一个可以可视化学习数据结构和算法的网站

目前支持以下数据结构和算法的可视化:
Currently, we have visualizations for the following data structures and algorithms:
Basics
Stack: Array Implementation
Stack: Linked List Implementation
Queues: Array Implementation
Queues: Linked List Implementation
Lists: Array Implementation (available in java version)
Lists: Linked List Implementation (available in java version)
Recursion
Factorial
Reversing a String
N-Queens Problem
Indexing
Binary and Linear Search (of sorted list)
Binary Search Trees
AVL Trees (Balanced binary search trees)
Red-Black Trees
Splay Trees
Open Hash Tables (Closed Addressing)
Closed Hash Tables (Open Addressing)
Closed Hash Tables, using buckets
Trie (Prefix Tree, 26-ary Tree)
Radix Tree (Compact Trie)
Ternary Search Tree (Trie with BST of children)
B Trees
B+ Trees
Sorting
Comparison Sorting
Bubble Sort
Selection Sort
Insertion Sort
Shell Sort
Merge Sort
Quck Sort
Bucket Sort
Counting Sort
Radix Sort
Heap Sort
Heap-like Data Structures
Heaps
Binomial Queues
Fibonacci Heaps
Leftist Heaps
Skew Heaps
Graph Algorithms
Breadth-First Search
Depth-First Search
Connected Components
Dijkstra's Shortest Path
Prim's Minimum Cost Spanning Tree
Topological Sort (Using Indegree array)
Topological Sort (Using DFS)
Floyd-Warshall (all pairs shortest paths)
Kruskal Minimum Cost Spanning Tree Algorithm
Dynamic Programming
Calculating nth Fibonacci number
Making Change
Longest Common Subsequence
Geometric Algorithms
2D Rotation and Scale Matrices
2D Rotation and Translation Matrices
2D Changing Coordinate Systems
3D Rotation and Scale Matrices
3D Changing Coordinate Systems
Others ...
Disjoint Sets
Huffman Coding (available in java version)
以B+树为例进行演示:
https://www.cs.usfca.edu/~galles/visualization/BPlusTree.html
空树中插入5

依次插入8,10,15

插入16
插入16后超过了关键字的个数限制,所以要进行分裂。在叶子结点分裂时,分裂出来的左结点2个记录,右边3个记录,中间key成为索引结点中的key,分裂后当前结点指向了父结点(根结点)。

插入17

插入18

插入20 21 22 20之后

继续插入7 6 9,继续分裂,高度变成3

还有删除、查找,其他数据结构都可以照此演示
【END】


分享-点赞-在看,谢谢~~




