Skip to navigation Skip to content
Simon Technology Blog
  • Architecture
  • Cloud
  • Database
  • Develop
  • Hardware
  • Industry
  • Language
  • Mobile
  • Opensource
  • OS
  • Web
Main Navigation

Tag: binary tree

[Data Structure] Recurrence and non-recursion of the binary tree

The test cases used in the code below are drawn as a tree and look like this:

When creating the tree, the array is given, and’#’ represents an illegal value , That is, the node is empty.

<

October 15, 2021By Simo Data Structure binary tree, creation, Data Structure, non-, recursion, Recursive, traversalLeave a Comment

[Data Structure] Tree and Binary Tree

Tree

Tree is a typical nonlinear data structure, It can be well applied to data collections that describe branching and hierarchical characteristics. It is a limited collection T composed of

October 15, 2021By Simo Data Structure binary tree, Data Structure, TreeLeave a Comment

[Data Structure] Closing of the binary tree

The node structure of the binary tree is now redefined as follows: leftchild lefttag _date righttag rightchild where: when lefttag=0, leftchild points to the left child;

October 15, 2021By Simo Data Structure binary tree, clues, Data StructureLeave a Comment

[Data Structure] Finding of Binary Trees and Calculation of Knights

The previous blog has basically introduced the basic algorithm of the binary tree. This article mainly introduces the search of nodes in the binary tree and the number of subtrees in the Kth row.

October 15, 2021By Simo Data Structure and first, binary tree, Calculation, Data Structure, lookup, Number, Row, TreeLeave a Comment

[Data Structure] – surrounding the two-fork tree

[Background]

The third stage of learning “Introduction to Data Structure” is almost the same It’s about to end. When doing the question, I will suddenly find out, oh, it turned out to be so.

October 15, 2021By Simo Data Structure binary tree, Data Structure, method, surround, traversalLeave a Comment

[Data Structure] Basic Knowledge of Binary Tree

Total number of branches = number of summary points-1

Number of leaf nodes = number of double branch nodes + 1

Preface Traversal: Root left and right

Mid-order traversal: left roo

October 15, 2021By Simo Data Structure binary tree, Data Structure, foundation, KnowledgeLeave a Comment

101. Symmetrical binary tree

Given a binary tree, check whether it is mirror-symmetrical.

For example, the binary tree [1,2,2,3,4,4,3] is symmetrical.

1
/ \
2 2
/ \ / \
3 4 4 3
But the following (1,2,2,null,3,nu

August 22, 2021By Simo Mathematics binary tree, symmetricalLeave a Comment

2019.9.26 – Implementation code of the binary tree

# coding:utf-8

class Node(object):
“”””””
def __init__(self, item):
self. elem = item
self,lchild = None
self.rchild = None

class Tree(object):
“””Binary Tree”””
def __init__(sel

August 22, 2021By Simo Mathematics 2019.9.26, binary tree, code, realizationLeave a Comment

144. Pre-sequence traversal of the binary tree

Given a binary tree, return its previous traversal.

Example:

Input: [1,null,2,3]
1
\
2
/
3 Output: [1,2,3]
Advanced: The recursive algorithm is very simple, can you do it through

August 22, 2021By Simo Mathematics binary tree, preamble, traversalLeave a Comment

Posts navigation

Page 1 Page 2
Recent Posts
  • Sencha-Touch-2 – Sencha Touch 2, Nested XML Analysis NodeValue
  • Add a separation line and format XML content
  • Is there a norm of simplified XML subsets?
  • Look at it when you write React
  • ReactJS – Present React Redux React-Router App to add the server to the Firebase hosted by the Firebase
Categories
  • Android
  • Apache
  • Apache Kafka
  • Asp
  • Auto-Test
  • Automated Build
  • Aws
  • Bitcoin
  • Browser
  • C & C++
  • C#
  • Centos
  • Cgi
  • Character
  • Cloud Service
  • Cocos2dx
  • Cordova
  • CSS
  • Data Structure
  • Delphi
  • Design Pattern
  • Dojo
  • Dubbo
  • ELK
  • Flex
  • football
  • Game
  • Hadoop
  • Hibernate
  • HTML
  • Hybrid
  • Intel
  • IOS
  • Ipad
  • iPhone
  • Java
  • Javascript
  • Jetty
  • JQuery
  • Jsp
  • Linux
  • Load Balance
  • Lua
  • Macbook
  • Macos
  • Mathematics
  • Micro Services
  • Monitoring
  • Motherboard
  • Mysql
  • Network Hardware
  • Network Marketing
  • Nginx
  • NodeJs
  • Nosql
  • Oracle
  • Os Theory
  • Performance
  • PHP
  • Postgresql
  • Power Designer
  • React
  • Redis
  • Regexp
  • Rom
  • Rss
  • Ruby
  • Search Engines
  • Shell Script
  • Silicon Valley
  • Silverlight
  • Software Design
  • Spring
  • Sql
  • Sqlite
  • Sqlserver
  • Storage
  • Storm
  • Surface
  • SVN
  • Swift
  • System Architecture
  • Tablet
  • Uncategorized
  • Unix
  • Visual Basic
  • Visual Studio
  • Web Crawler
  • WebService
  • Windows
  • Wireless
  • XML
  • ZooKeeper
Archives
  • October 2021
  • September 2021
  • August 2021
  • May 2021
  • April 2021
  • September 2020
  • September 2019
  • August 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
© Simon Technology Blog 2025 • ThemeCountry Powered by WordPress