Giter VIP home page Giter VIP logo

binarytree's Introduction

A complete binary tree with most operations

Function details: 1.BstNode* GetNewNode(int data) creating a new node and return that node's address

2.BstNode* Insert(BstNode* root, int data) inserting a new node with int data

3.Bool Search(BstNode* root, int data) searching data return booleanBool

4.FindMin/FindMax find the minimum and maximum value in the treeand

5.FindHeight(BstNode* root) return heigh of the tree

6.LevelOrder(BstNode* root) print out the tree in level order

7.preOrder(BstNode* root) root, left, right

8.inOrder(BstNode* root) left, root, right

9.postOrder(BstNode* root) left, right, root

10.isSubTLesser(BstNode* root, int value) check if sub tree is lesser than the value

11.isSubTGreater(BstNode* root, int value) check if sub tree is greater than the value

12.isBST(BstNode* root) check if tree is a binary search tree

13.isBSTUtil(BstNode* root, int minValue, int maxValue) compare min and max in the tree

14.isBST2(BstNode* root) check if the tree is binary search tree using min and max

binarytree's People

Contributors

t-weilin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.