提交 a6657f84 编写于 作者: W wizardforcel

2020-07-10 23:06:42

上级 74aebad2
......@@ -10,7 +10,7 @@
![queue first in first out diagram](img/ee40d5ecf1e9d1f65fb5588ea32c5051.png "Queue")
FIFO representation
FIFO 表示
......@@ -49,7 +49,7 @@ FIFO representation
![Demonstrating how front and rear indexes are modified during enqueue and dequeue operations](img/839247f58959fe9eff35f88034788ae4.png "Working of queue operations")
Working of queue operations
队列操作的原理
......@@ -395,7 +395,7 @@ int main() {
![size of queue reduced after enqueuing and dequeuing](img/0102c607330d976b4cd074f442b68f1a.png "Queue representation")
Limitation of a queue
队列限制
......
......@@ -16,7 +16,7 @@
![Simple queue ](img/1c163edfaf13ddd0f8201164e5fa0228.png "Simple queue ")
Simple queue
简单队列
......@@ -30,7 +30,7 @@ Simple queue
![Circular queue ](img/9933b76c7f847744348e3b665fb29e99.png "Circular queue ")
Circular queue
循环队列
......@@ -46,7 +46,7 @@ Circular queue
![Priority queue](img/d83164c6c98b6c9d201ca288a380b2da.png "Priority queue")
Priority queue
优先队列
......@@ -60,7 +60,7 @@ Priority queue
![Double ended queue](img/1d0d455639cd126d698ebd12c457109a.png "Double ended queue")
Double ended queue
双端队列
......
......@@ -8,7 +8,7 @@
![why circular queue is needed](img/95872c16af569b7f5c6ab65003ee8360.png "Demerit of queue")
Demerit of queue
循环队列
......@@ -30,7 +30,7 @@ if REAR + 1 == 5 (overflow!), REAR = (REAR + 1)%5 = 0 (start of queue)
![Circular increment in circular queue](img/0efcc554d9fdad49bfd665697ea38f35.png "Circular queue")
Circular queue representation
循环队列表示
......@@ -54,7 +54,7 @@ Circular queue representation
![how circular queue works](img/354624006a841cb4d3c05bd9fbf4cef5.png "Working of circular queue")
Working of circular queue
循环队列的原理
......
......@@ -12,7 +12,7 @@
![The highest priority element dequeued first](img/164bb96650fb4d788e1664cbb10451a2.png "Priority Queue")
The highest priority element dequeued first
优先级最高的元素先出队
......
......@@ -4,11 +4,11 @@
#### 在本教程中,您将学习什么是双端队列(双端队列)。 另外,您还将找到在 C,C++ ,Java 和 Python 的双端队列上进行不同操作的工作示例。
双端队列或双端队列[队列](https://www.programiz.com/dsa/queue)的一种,其中元素的插入和删除可以从前面或后面进行。 因此,它不遵循 FIFO 规则(先进先出)。
双端队列是[队列](https://www.programiz.com/dsa/queue)的一种,其中元素的插入和删除可以从前面或后面进行。 因此,它不遵循 FIFO 规则(先进先出)。
![Deque](img/3b52607572f2592ce4806bc5b381a7a6.png "Double ended queue")
Deque or Double Ended Queue
双端队列
......@@ -36,7 +36,7 @@ Deque or Double Ended Queue
![Initialize array](img/8bf1dbe268ca9d007cc43862b3d6ed67.png "Initialize array")
Initialize an array and pointers
初始化数组和指针
......
......@@ -14,7 +14,7 @@
![linked list concept of chaining data points](img/fb9ddb886d36065ec2feda25a061319f.png "Linkedin representation")
Linkedin representation
链表表示
......@@ -77,7 +77,7 @@ head = one;
![linked list with data](img/c1875da7c507e1676d1ec9c4f5f3230b.png "Simple linked list")
Simple linked list with three nodes
具有三个节点的简单链表
......
......@@ -18,7 +18,7 @@
![singly linked list](img/298eb5720e9920eb3c64180c5b2c9439.png "Singly linked list")
Singly linked list
单链表
......@@ -67,7 +67,7 @@ head = one;
![doubly linked list](img/41eb07fbf5d37f5a137a348ed7e75750.png "Doubly linked list")
Doubly linked list
双链表
......@@ -122,7 +122,7 @@ head = one;
![circular linked list](img/1c5bf95491fb9e2834779ca8b31ac0c7.png "Circular linked list")
Circular linked list
循环链表
......
......@@ -12,7 +12,7 @@
![Fibonacci Heap](img/43ea767d63a5e6b25af45fb938afcf36.png "Fibonacci Heap")
Fibonacci Heap
斐波那契堆
......@@ -40,7 +40,7 @@ Fibonacci Heap
![Fibonacci Heap Structure](img/18b0fb38e55bf98b19861e55062b888c.png "Fibonacci Heap Structure")
Fibonacci Heap Structure
斐波那契堆结构
......@@ -76,7 +76,7 @@ insert(H, x)
![Insertion operation in fibonacci heap](img/15885f47ee2cc463f874f456de46b0dc.png "Insertion operation in fibonacci heap")
Insertion Example
插入示例
......@@ -93,7 +93,7 @@ Insertion Example
![Union of two heaps](img/2036daf239e8b143c68216d100318ddc.png "Union of two heaps")
Union of two heaps
两个堆的组合
......
......@@ -8,7 +8,7 @@
![tree in data structure](img/624888bed1cba06add8d3060d14d829d.png "tree")
A Tree
一个树
......@@ -38,7 +38,7 @@ A Tree
![Nodes and edges of a tree](img/b3afbaf84df4ccec262cc8d2d9cb7d0b.png "Nodes and edges of a tree")
Nodes and edges of a tree
树的节点和边
......@@ -60,7 +60,7 @@ Nodes and edges of a tree
![Height and depth of each node in a tree](img/b3ace53fa0a1861e5852f5f6ddbfedae.png "Tree showing height and depth at each node")
Height and depth of each node in a tree
树中每个节点的高度和深度
......@@ -74,7 +74,7 @@ Height and depth of each node in a tree
![Forest in data structure](img/7d939102fb7c6672cfcd8aea36f881cb.png "Forest")
Creating forest from a tree
从树上创建森林
......
# 树遍历 - 中序,前序和后序
# 树遍历 - 中序,前序和后序
> 原文: [https://www.programiz.com/dsa/tree-traversal](https://www.programiz.com/dsa/tree-traversal)
......@@ -10,7 +10,7 @@
![sample tree to learn tree traversal - root node contains 1 with leftchild as 12 and right child as 9\. The left child of root further has left child 5 and right child 6](img/d0cef13ebb42192a9a39cbd080eebd50.png "Tree Traversal")
Tree traversal
树的遍历
......@@ -49,7 +49,7 @@ struct node {
![root node with left subtree and right subtree](img/b310000e943f7eec513765cdf7546e34.png "Left and Right Subtree")
Left and Right Subtree
左右子树
......@@ -103,7 +103,7 @@ display(root->data)
![outlining left subtree, right subtree and root node](img/8a87c556f934ac5cb9aa04f9d88a45fb.png "Left and Right Subtree")
Left and Right Subtree
左右子树
......@@ -113,7 +113,7 @@ Left and Right Subtree
![we put the left subtree, root node and right subtree in a stack in that order so that we can display root node and traverse right subtree when we are done with left subtree](img/03c0b83d4741fe39927cac2a8501db99.png "Stack")
Stack
......@@ -129,7 +129,7 @@ Left subtree -> root -> right subtree
![situation of stack after traversing left subtree, stack now contains the elements of left subtree, followed by root, followed by right child of root](img/aae971b9affa77adf32cf66c02c07d15.png "Stack")
Final Stack
最终栈
......
# 二叉树
# 二叉树
> 原文: [https://www.programiz.com/dsa/binary-tree](https://www.programiz.com/dsa/binary-tree)
......@@ -10,7 +10,7 @@
![Binary Tree](img/8c71e1db75a25dba4f45c40dc3a51d46.png "Binary Tree")
Binary Tree
二叉树
......@@ -24,7 +24,7 @@ Binary Tree
![Full binary tree](img/49f25c60eff30f77913dd5fa576496c1.png "Full binary tree")
Full Binary Tree
满二叉树
......@@ -36,7 +36,7 @@ Full Binary Tree
![Perfect binary tree](img/2166820fd9f04e3185cca16b87512e32.png "Perfect binary tree")
Perfect Binary Tree
完美二叉树
......@@ -52,7 +52,7 @@ Perfect Binary Tree
![Complete Binary Tree](img/0b89bc3fa19185c45b18fd3f571da193.png "Complete Binary Tree")
Complete Binary Tree
完全二叉树
......@@ -64,7 +64,7 @@ Complete Binary Tree
![Degenerate Binary Tree](img/975e7cb7fcee6752306acfa7462b33ae.png "Degenerate Binary Tree")
Degenerate Binary Tree
退化树
......@@ -74,7 +74,7 @@ Degenerate Binary Tree
![Skewed Binary Tree](img/33a3e3ea69a23289bc2a7282f43792f3.png "Skewed Binary Tree")
Skewed Binary Tree
偏二叉树
......@@ -84,7 +84,7 @@ Skewed Binary Tree
![Balanced Binary Tree](img/e50f46a46d34b28fc7a4f6337599934b.png "Balanced Binary Tree")
Balanced Binary Tree
平衡二叉树
......@@ -107,7 +107,7 @@ struct node
![Binary tree](img/36c0692c7e1cf7963b9f23eba69bf7b1.png "Binary tree representation")
Binary Tree Representation
二叉树表示
......
......@@ -10,7 +10,7 @@
![full binary tree](img/49f25c60eff30f77913dd5fa576496c1.png "Full Binary Tree")
Full Binary Tree
满二叉树
......
......@@ -8,7 +8,7 @@
![Perfect Binary Tree](img/2166820fd9f04e3185cca16b87512e32.png "Perfect Binary Tree")
Perfect Binary Tree
完美二叉树
......@@ -21,7 +21,7 @@ Perfect Binary Tree
![Perfect Binary Tree (Recursive Representation)](img/babefb36f8c3a740f359a7d8fab6227b.png "Perfect Binary Tree")
Perfect Binary Tree (Recursive Representation)
完美二叉树(递归表示)
......
......@@ -13,7 +13,7 @@
![Complete Binary Tree](img/0b89bc3fa19185c45b18fd3f571da193.png "Complete Binary Tree")
Complete Binary Tree
完全二叉树
......@@ -23,25 +23,25 @@ Complete Binary Tree
![Comparison between full binary tree and complete binary tree](img/41d9dd7ec5f9366619865f1f46e85606.png "Comparison between full binary tree and complete binary tree")
Comparison between full binary tree and complete binary tree
完全二叉树与满二叉树的比较
![Comparison between full binary tree and complete binary tree](img/f89c25fb0c432c2848d2885b14cc34ef.png "Comparison between full binary tree and complete binary tree")
Comparison between full binary tree and complete binary tree
完全二叉树与满二叉树的比较
![Comparison between full binary tree and complete binary tree](img/f66efbaa73b350ca3831dc2a0a39bd87.png "Comparison between full binary tree and complete binary tree")
Comparison between full binary tree and complete binary tree
完全二叉树与满二叉树的比较
![Comparison between full binary tree and complete binary tree](img/86283613d9c6fe0e6223416c66266148.png "Comparison between full binary tree and complete binary tree")
Comparison between full binary tree and complete binary tree
完全二叉树与满二叉树的比较
......@@ -61,7 +61,7 @@ Comparison between full binary tree and complete binary tree
![Complete binary tree creation](img/102b22745befe498a273190379c7b4ce.png "Put the second element as a left child of the root node and the third element as the right child")
12 个是左侧子级,9 个是右侧子级
12 是左侧子级,9 是右侧子级
......@@ -70,7 +70,7 @@ Comparison between full binary tree and complete binary tree
![Complete binary tree creation](img/846541cb9b5dcce8a8f11e736bb6c9f3.png "Keep repeating until the last element is reached")
5 个是左侧子级,6 个是右侧子级
5 是左侧子级,6 是右侧子级
......
......@@ -32,7 +32,7 @@ Theta 表示法从上方和下方将函数括起来。 由于它代表算法运
![Theta notation](img/d7ce1c75451007212bf7cc46e5e4a6a0.png "Theta notation")
Theta bounds the function within constants factors
Theta 将函数限制在常数因子之内
......@@ -55,7 +55,7 @@ Theta bounds the function within constants factors
![Big-O notation](img/effc73cfa83d102b047aae80fdab01eb.png "Big-O")
Big-O gives the upper bound of a function
大 O 给出函数的上限
......@@ -74,11 +74,11 @@ O(g(n)) = { f(n): there exist positive constants c and n0
## Ω 表示法(Ω表示法)
Ω表示算法运行时间的下限。 因此,它提供了算法的最佳情况复杂度。
Ω 表示算法运行时间的下限。 因此,它提供了算法的最佳情况复杂度。
![Omega Notation](img/571c8e733045af0977623af6271d187a.png "Omega")
Omega gives the lower bound of a function
Ω 给出函数的下限
......
......@@ -8,7 +8,7 @@
![a stack of plates is a good representation of stack data structure as you can only take out a plate from the top and put a plate on top of the other plates](img/6ce178843695b578fdd1800cf017c835.png "Pile of plates act as a stack")
Stack representation in the form of pile of plates
栈表示一堆板子
......@@ -27,7 +27,7 @@ Stack representation in the form of pile of plates
![stack push pop fifo operations](img/cc824444cc125ecc85965558f6ac6b08.png "Stack operations")
Stack operations
栈操作
......@@ -62,7 +62,7 @@ Stack operations
![stack operations](img/8077af9220d5970900c852ea1f885985.png)
Stack Operations
栈操作
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册