Binary Tree: HOW TO Create, Traverse, and Search it [Python] 2022. Binary Search Tree.

Published: 03 May 2022
on channel: Code Like a Lawyer
1,245
63

How to create, traverse and search a binary tree in Python using a simple object-oriented design. You will learn how to traverse a binary tree in Python in 4 different ways: PREORDER, INORDER, POSTORDER and LEVELORDER.

This short program will also allow you to search the binary tree for specific values or nodes in an elegant, organized, and intuitive fashion.

Python is an easy, and powerful programming language! It allows the quick implementation of a Binary Tree in only a few lines of code. Therefore, you will be able to learn the creation, traversal, and search of a Binary Tree in only a few minutes.

Short Preview:
   • FUN Preview: Binary Tree with [Python]!! #...  

Check out my YouTube Channel:
   / @codelikealawyer4585  

If you want to support this channel, check out these cool gift ideas at the:

Code Like a Lawyer Store:
https://tinyurl.com/ym6t9sn7


#codelikealawyer #binarytree #pythonthelegalway

Time Stamps

0:00 Intro
0:15 Binary Tree Definition
0:29 Binary Tree Structure
0:35 Node Class Outline
0:45 Binary Tree Class Outline
1:08 Queue Class Outline
1:16 Beginning of Code Section
1:18 Node Class
2:46 BinaryTree Class
3:38 Preorder Method
6:34 Inorder Method
8:03 Postorder Method
10:20 Levelorder Method (Partial)
11:25 Queue Class
12:12 Enqueue Method
13:09 Dequeue Method
14:10 Get_Item Method
16:26 Levelorder Method (Continued)
20:50 Print Tree Method
25:45 Instantiate Binary Tree object and Create Tree
28:17 Execute Program: Testing
32:55 Search Tree Method
38:12 Search Testing
41:17 Next Video


On this page of the site you can watch the video online Binary Tree: HOW TO Create, Traverse, and Search it [Python] 2022. Binary Search Tree. with a duration of hours minute second in good quality, which was uploaded by the user Code Like a Lawyer 03 May 2022, share the link with friends and acquaintances, this video has already been watched 1,245 times on youtube and it was liked by 63 viewers. Enjoy your viewing!