当前位置:网站首页>CPT 102_ LEC 20
CPT 102_ LEC 20
2022-06-11 02:50:00 【NONE_ WHY】
1. Tree
1.1. Introduction to Trees
1.1.1. Basic
- Used for non-linear data structures
- Family trees
- Organisational charts
- Trees offer an alternative
- Representation
- Implementation strategy
- Set of algorithms
1.1.2. Binary Tree
- A binary tree
- empty
- a root node together with two binary trees
- left subtree
- right subtree
1.1.3. What is a tree exactly?
- Models the parent/child relationship between different elements
- Each child only has one parent
- Each parent has ? children
- From mathematics
- A “Directed Acyclic Graph”【 Directed acyclic graph 】 (DAG)
- At most one path from any one node to any other node
1.1.4. Some Concepts
- Level --> Equivalent to the “row” that a value is in
- Depth --> The number of levels in the tree
- Leaf Nodes --> A node with no children
- Non-leaf Nodes
- Balanced --> All leaf nodes are on levels n and (n+1), for some value of n
1.1.5. How many types of tree are there?
- Examples
- Red-Black Tree
- AVL Tree
- ...
- Different types are used for different things
- To improve speed
- To improve the use of available memory
- To suit particular problems
1.1.6. Trees and Recursion
- Recursively defined data structure
- Recursion is very natural for trees – important!
- Recursion tree
- If you don’t use recursion then use iteration
1.1.7. What is a tree useful for?
- Artificial Intelligence
- planning
- navigating
- games
- Representing things
- Simple file systems
- Class inheritance and composition
- Classification
- HTML pages
- Parse trees for languages
- Essential in compilers like Java, C# etc
- 3D graphics (e.g. BSP trees)
1.1.8. Some Example
- Tic Tac Toe【 Jingzi chess 】
- N-Queen【N Queen 】
- Decision Tree
1.1.9. Conclusion
- Data representation of tree is important
- Efficiently adding, accessing and removing data from a tree is important
- Trees can be made efficient and help you organise data
- Trees are useful in
- Computer graphics
- Artificial Intelligence
- Databases
边栏推荐
- error exepected identifier before ‘(‘ token, grpc 枚举类编译错误
- How to fix syntax errors in WordPress websites
- P4338 [zjoi2018] history (tree section) (violence)
- MySQL backup and recovery
- One line of code solves the problem that the time to fetch datetime from MySQL database is less than eight hours
- 近期学习和更新计划
- 【斐波那契数列】
- What is ttfb
- Jetpack compose scaffold and topappbar (top navigation)
- How to state clearly and concisely the product requirements?
猜你喜欢

AOSP ~ 修改WebView默认实现

微信小程序

mysql重装时写my.ini配置文件出错

ADVANCE. AI CEO Shoudong will share the compliance of cross-border e-commerce using AI technology at the 2022 emerging market brands online Summit

Navicat premium 15 tool is automatically deleted by anti-virus protection software solution

那些笑着离开“北上广”的人,为何最后都哭了?

One line of code solves the problem that the time to fetch datetime from MySQL database is less than eight hours

JS memory leak

How to state clearly and concisely the product requirements?

js 内存泄漏
随机推荐
Cmake common commands
弄懂了采矿业与碳中和的逻辑,就读懂了矿区无人驾驶的千亿市场
Istio安装与使用
CPT 102_LEC 18
MOFs, metal organic framework materials of folic acid ligands, are loaded with small molecule drugs such as 5-fluorouracil, sidabelamine, taxol, doxorubicin, daunorubicin, ibuprofen, camptothecin, cur
AOSP ~ 修改WebView默认实现
Will your company choose to develop data center?
How to fix syntax errors in WordPress websites
6 best WordPress Image optimizer plug-ins to improve WordPress website performance
从绿联冲刺IPO,看手机配件市场沉浮录
扁平数据转tree与tree数据扁平化
Byte beating | the first batch of written examination for game R & D post (question solution)
新来的同事问我 where 1=1 是什么意思???
CPT 102_LEC 15
What is ttfb
Multilevel mesoporous organometallic framework material zif-8 loaded with lactic acid oxidase (LOD) / ferric oxide (Fe304) / doxorubicin / insulin /cas9 protein / metronidazole / emodin methyl ether
92. actual combat of completable future
AOSP - Developer mode is enabled by default
MySQL backup and recovery
微信小程序