Skip to content

cosc-2030-sp-2019/lab-04-BA848

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

cosc-2030-lab04-binarytrees

Lab04 Bailie Allemand due 3.11.2019

Distinguish between Binary Search, a binary tree, and a binary search tree.

Binary Search- Can also be identified as a half-interval search, logarithmic search, or binary chop. It is a search algorithm that finds the position of a target value within a sorted array. a Binary search compares the target value to the middle elements of the array.

Binary Tree- Quite self explanatory, a binary tree is a tree data structure where each parent node(contains key values) has at most two children.These "children" are referred to as the left node and the right node which can either be empty or have a left and/or right node of their own. Binary trees can be described as full, complete, or "flat." A full binary tree means that each node has two or zero "children." A complete binary tree is depicted when all levels of nodes except the last have 2 children filled in from the left. A "flat" tree is depicted when only the left or only the left nodes exist.

Binary Search Tree(BST)- Can also be identified as an ordered binary tree, a BST is depicted by ordering/sorting data in nodes containing key values. The properties of a BST include that in any subtree if the keys are less than the root key value then they are in the left subtree, and if the keys are greater than the root key value then they are in the right subtree. Insertion of new values is simple to follow the trail of less than or greater then. The new node is inserted in exactly one place, but given a set of key values, there are more than one possible binary search trees. Deletion of nodes can be quite complicated when translating into code, more to be discovered.

About

lab-04-BA848 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages