Giter Site home page Giter Site logo

haris-bit / binarysearchtree Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 1 KB

Successfully built a Binary Search Tree (BST) data structure in Java. - a BinarySearchTree class containing value, left and right child nodes and a depth value. - an .insert() method to place a node of that value at the correct location in the Binary Search Tree. The time efficiency of this operation is O(logN) – if there are N nodes in the BST, the max depth of an average tree is log(n), so this method makes at most log(n) value comparisons. In the worst case of an imbalanced tree (all values on one side), the performance would be O(N). - a .getNodeByValue() method to retrieve a node in the tree by its value. The time efficiency of this operation is also O(logN) – if there are N nodes in the BST, the max depth of the tree is log(n), so this method makes at most log(n) value comparisons. In the worst case of an imbalanced tree (all values on one side), the performance would be O(N). - a .depthFirstTraversal() method to print the inorder traversal of the Binary Search Tree. This visits every single node, so if there are N nodes, time efficiency for traversal is O(N).

Java 100.00%
algorithm data-structures tree

binarysearchtree's Introduction

Hi there, I'm Haris! 👋

GIF

Full-Stack Software Engineer | Software Development Enthusiast | Technophile

  • 🔭 I’m currently working to become a Full Stack Developer
  • 🌱 I’m currently learning Frontend Development and Backend Engineering
  • 🤔 Exploring AI and Data Science
  • 👯 I’m looking to collaborate with other content creators and developers
  • ⚡ Techthusiast

More About Me


Haris's GitHub stats


Top Langs

Languages & Tools



Let's Connect!


binarysearchtree's People

Contributors

haris-bit avatar

Watchers

 avatar  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.