Binary Search Trees

class Node {
constructor(value){
this.value = value }
}
class BinarySearchTree{
constructor(){
this.values = [] }
}
let arr = [6, 9, 7, 3, 5]
// index 0 1 2 3 4
arr.unshift(8) arr = [8, 6, 9, 7, 3, 5]
// index 0 1 2 3 4 5

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store