<!DOCTYPE html>
<!-- saved from url=(0037)https://zhuanlan.zhihu.com/p/56895993 -->
<html lang="zh" data-hairline="true" class="itcauecng" data-theme="light" data-rh="data-theme" style=""><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>二叉树的遍历详解 - 知乎</title><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><meta name="renderer" content="webkit"><meta name="force-rendering" content="webkit"><meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1"><meta name="google-site-verification" content="FTeR0c8arOPKh8c5DYh_9uu98_zJbaWw53J-Sch9MTg"><meta data-rh="true" name="keywords" content="二叉树,算法,数据结构"><meta data-rh="true" name="description" content="概述二叉树的遍历是一个很常见的问题。二叉树的遍历方式主要有:先序遍历、中序遍历、后序遍历、层次遍历。先序、中序、后序其实指的是父节点被访问的次序。若在遍历过程中,父节点先于它的子节点被访问,就是先序…"><meta data-rh="true" property="og:title" content="二叉树的遍历详解"><meta data-rh="true" property="og:url" content="https://zhuanlan.zhihu.com/p/56895993"><meta data-rh="true" property="og:description" content="概述二叉树的遍历是一个很常见的问题。二叉树的遍历方式主要有:先序遍历、中序遍历、后序遍历、层次遍历。先序、中序、后序其实指的是父节点被访问的次序。若在遍历过程中,父节点先于它的子节点被访问,就是先序…"><meta data-rh="true" property="og:image" content="https://picx.zhimg.com/v2-f70761c7c5f34494a59bbddc302a3afe_720w.jpg?source=172ae18b"><meta data-rh="true" property="og:type" content="article"><meta data-rh="true" property="og:site_name" content="知乎专栏"><link data-rh="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-152.81060cab.png"><link data-rh="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-152.81060cab.png" sizes="152x152"><link data-rh="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-120.d5793cac.png" sizes="120x120"><link data-rh="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-76.7abf3393.png" sizes="76x76"><link data-rh="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-60.362a8eac.png" sizes="60x60"><link crossorigin="" rel="shortcut icon" type="image/x-icon" href="https://static.zhihu.com/heifetz/favicon.ico"><link crossorigin="" rel="search" type="application/opensearchdescription+xml" href="https://static.zhihu.com/heifetz/search.xml" title="知乎"><link rel="dns-prefetch" href="https://static.zhimg.com/"><link rel="dns-prefetch" href="https://pica.zhimg.com/"><link rel="dns-prefetch" href="https://picx.zhimg.com/"><link rel="dns-prefetch" href="https://pic1.zhimg.com/"><link rel="dns-prefetch" href="https://pic2.zhimg.com/"><link rel="dns-prefetch" href="https://pic3.zhimg.com/"><link rel="dns-prefetch" href="https://pic4.zhimg.com/"><link rel="dns-prefetch" href="https://static.zhihu.com/"><style data-emotion-css="9mvwt1">:root{--zhc-padding-horizontal:20px;--zhc-padding-vertical:16px;--zhc-notification-top:75px;--app-padding:16px;--app-header-height:52px;--app-max-width:640px;--app-width:1000px;--app-font-size:15px;}</style><script nonce="" data-web-reporter-config="{"platform":"web","project":"heifetz"}">!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).webReporter={})}(this,function(e){"use strict";var t={},n=!1,o=function(){var e,o,r,a,i;return n||(e=document.querySelector("script[data-web-reporter-config]"),o=e&&e.dataset.webReporterConfig||"{}",r=JSON.parse(o),a=r.platform,i=r.project,t={platform:a,project:i},n=!0),t};function r(e){return a(function(){return localStorage.getItem(e)})()}function a(e){return function(){try{return e.apply(void 0,arguments)}catch(e){}}}var i=a(function(e,t){var n={platform:"web",project:o().project,clientTimestamp:+new Date};!function(e,t,n){"1"===r("weber:logenabled")&&console.log("[web-reporter]%o",{type:e,base:t,data:n})}(e,n,t),function(e,t){var n=btoa(JSON.stringify(t));if("undefined"!=typeof Blob&&window.navigator&&window.navigator.sendBeacon){var o=new Blob([n],{type:"text/plain"});navigator.sendBeacon(e,o)}else{var r=new XMLHttpRequest;r.open("POST",e),r.withCredentials=!1,r.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),r.send(n)}}(r("weber:api")||"https://apm.zhihu.com/collector/web_json",{type:e,base:n,data:t})});e.report=i,Object.defineProperty(e,"__esModule",{value:!0})});
</script><link href="./二叉树的遍历详解_files/7191.216a26f4.89b44032a371ad982cda.css" crossorigin="" rel="stylesheet"><link href="./二叉树的遍历详解_files/column.216a26f4.62a2225227c16854bc46.css" crossorigin="" rel="stylesheet"><link rel="stylesheet" type="text/css" href="./二叉树的遍历详解_files/user-hover-card.216a26f4.0e3930e2ffc649f7ed8b.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./二叉树的遍历详解_files/GoodsRecommendGoodsCardList.216a26f4.d95ce79191cdf8d7ac28.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./二叉树的遍历详解_files/report_modals.216a26f4.370935343bb8c3bca346.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./二叉树的遍历详解_files/632.216a26f4.763aa082a89da06da92e.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./二叉树的遍历详解_files/3433.216a26f4.1c95267e7d0f4f116db2.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./二叉树的遍历详解_files/ECommerceAd.216a26f4.c90979d08ed65b86fc8f.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./二叉树的遍历详解_files/1468.216a26f4.101bb14a2c1d8d20b744.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./二叉树的遍历详解_files/EditableV2.216a26f4.6c9301eaad8df7e50cb2.css" crossorigin="anonymous"><script nonce="">!function(){"use strict";!function(e,n){var r=[];function t(e){return function(){r.push([e,arguments])}}n.Raven={captureException:t("captureException"),captureMessage:t("captureMessage"),captureBreadcrumb:t("captureBreadcrumb")};var a,o,c,i,s,u="undefined"!=typeof DOMError;function d(e){var n=e instanceof Error||e instanceof ErrorEvent||u&&e instanceof DOMError||e instanceof DOMException;Raven.captureException(n?e:new Error(e.message||e.reason))}n.addEventListener("unhandledrejection",d),n.addEventListener("error",d,!0),a=e.src,o=e,c=function(){r.forEach(function(e){var n;(n=Raven)[e[0]].apply(n,e[1])}),n.removeEventListener("unhandledrejection",d),n.removeEventListener("error",d,!0)},i=document.head||document.getElementsByTagName("head")[0],(s=document.createElement("script")).crossOrigin=o.crossOrigin,s.dataset.sentryConfig=o["data-sentry-config"],s.onload=c,s.src=a,i.appendChild(s)}({"defer":true,"crossOrigin":"anonymous","src":"https://unpkg.zhimg.com/@cfe/[email protected]/dist/init.js","data-sentry-config":"{\"dsn\":\"https://[email protected]/1224\",\"sampleRate\":0.1,\"release\":\"1312-6276f0e0\",\"ignoreErrorNames\":[\"NetworkError\",\"SecurityError\"],\"ignoreErrorsPreset\":\"ReactApp\",\"tags\":{\"app_name\":\"heifetz\"}}"},window)}();
</script><script crossorigin="anonymous" data-sentry-config="{"dsn":"https://[email protected]/1224","sampleRate":0.1,"release":"1312-6276f0e0","ignoreErrorNames":["NetworkError","SecurityError"],"ignoreErrorsPreset":"ReactApp","tags":{"app_name":
没有合适的资源?快使用搜索试试~ 我知道了~
二叉树的遍历详解.rar
共56个文件
下载:24个
jpg:13个
css:10个
0 下载量 193 浏览量
2024-04-30
13:38:29
上传
评论
收藏 1.68MB RAR 举报
温馨提示
二叉树的遍历 二叉树的遍历是一个很常见的问题。二叉树的遍历方式主要有:先序遍历、中序遍历、后序遍历、层次遍历。先序、中序、后序其实指的是父节点被访问的次序。若在遍历过程中,父节点先于它的子节点被访问,就是先序遍历;父节点被访问的次序位于左右孩子节点之间,就是中序遍历;访问完左右孩子节点之后再访问父节点,就是后序遍历。不论是先序遍历、中序遍历还是后序遍历,左右孩子节点的相对访问次序是不变的,总是先访问左孩子节点,再访问右孩子节点。而层次遍历,就是按照从上到下、从左向右的顺序访问二叉树的每个节点。
资源推荐
资源详情
资源评论
收起资源包目录
二叉树的遍历详解.rar (56个子文件)
二叉树的遍历详解
二叉树的遍历详解.html 394KB
二叉树的遍历详解_files
7962c8e7fb0aec832694644111d3fadc_l.jpg 19KB
v2-abed1a8c04700ba7d72b45195223e0ff_l.jpg 17KB
push.js.下载 308B
lib-83b0f42f.app.4a9930b24581b1475187.js.下载 34KB
1468.216a26f4.101bb14a2c1d8d20b744.css 26KB
7191.app.bfc795709d736620bd17.js.下载 1.86MB
logo.e049e9b9.png 16KB
js 541B
v2-a9c5b62c02ec72cbb9e52de99f2605f8_l.jpg 4KB
632.216a26f4.763aa082a89da06da92e.css 5KB
v2-3ac903d08862c6acf7e566bbc8f588be_l(1).jpg 4KB
v2-6b728d2bb0331f109ddc594a8ae799e4_l.jpg 3KB
EditableV2.216a26f4.6c9301eaad8df7e50cb2.css 33KB
react-dom.production.min.js.下载 118KB
ECommerceAd.216a26f4.c90979d08ed65b86fc8f.css 30KB
v2-77ef3f89c351fdb851e1c3fb032615c9_l.jpg 3KB
column.216a26f4.62a2225227c16854bc46.css 215KB
zap.js.下载 347KB
lib-0e5ce61e.app.b22b78c2be57c983262f.js.下载 40KB
v2-d74064b7de595d257339acf8c4784dce_250x0.jpg 35KB
user-hover-card.216a26f4.0e3930e2ffc649f7ed8b.css 22KB
v2-b62e608e405aeb33cd52830218f561ea.png 4KB
v2-f70761c7c5f34494a59bbddc302a3afe_1440w.image 12KB
vendor.b2043823c211547b094b.js.下载 196KB
3433.216a26f4.1c95267e7d0f4f116db2.css 17KB
v2-e9eb296238feba1867dc2b7b6deec257_720w.webp 9KB
lib-79b5cf47.app.8b6b6bf4b6d894db9b07.js.下载 55KB
lib-75fc9c18.app.3db651c252e14ef6658e.js.下载 58KB
report_modals.216a26f4.370935343bb8c3bca346.css 10KB
v2-abed1a8c04700ba7d72b45195223e0ff_l(1).jpg 17KB
v2-7c2af84476c3a857fa4b677c0d4001f4_l.jpg 3KB
lib-38cf5c11.app.1ffcf96b1a1c5e9ea0b9.js.下载 36KB
v2-0636c4b40662affafc75958bcfcf166d_l.jpg 21KB
init.js.下载 38KB
v2-55f42c78e51c0de9d1b942278ee1cfc1_720w.webp 15KB
v2-4036bf7fe2271a7a12eef8feb24104bd_l.jpg 27KB
column.app.c0c81a708c64e7cc5add.js.下载 1.38MB
lib-330004dc.app.7437cf54ac28fca0e302.js.下载 68KB
v2-3ac903d08862c6acf7e566bbc8f588be_l.jpg 4KB
lib-29107295.app.42d07f814b7b05187671.js.下载 68KB
wm.3.0.0_33d41777.min.js.下载 88KB
core-optimi.v2.26.1.min.js.下载 425KB
emoticon.js.下载 14KB
aria.js.下载 339KB
7191.216a26f4.89b44032a371ad982cda.css 168KB
load.min.js.下载 34KB
GoodsRecommendGoodsCardList.216a26f4.d95ce79191cdf8d7ac28.css 16KB
react-dom-server.browser.production.min.js.下载 20KB
lib-2ec050f6.app.9469536515556ff8f6ab.js.下载 38KB
saved_resource.html 149B
hm.js.下载 29KB
v2-419a1a3ed02b7cfadc20af558aabc897.png 3KB
react.production.min.js.下载 11KB
v2-82a2a4ac3759ef57cdebc4808adc2056_l.jpg 12KB
runtime.app.ff478b603408b4d8c585.js.下载 11KB
共 56 条
- 1
资源评论
比特流1024
- 粉丝: 1945
- 资源: 155
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功