Skip to content

v1.2.0 – Add Balanced Binary Search Tree project

Latest

Choose a tag to compare

@singharyan006 singharyan006 released this 13 Jul 16:33

✨ New Feature: Balanced Binary Search Tree (BST)

This release adds a fully functional Balanced Binary Search Tree implementation written from scratch in JavaScript, as part of The Odin Project curriculum.


✅ Highlights:

  • Tree class with:
    • Balanced buildTree() logic from sorted, unique arrays
    • Duplicate-free insertion logic
  • Supported operations:
    • insert(value)
    • deleteItem(value) (handles all deletion cases)
    • find(value)
    • height(value)
    • depth(value)
    • isBalanced()
    • rebalance()
  • Traversal methods:
    • inOrderForEach(callback)
    • preOrderForEach(callback)
    • postOrderForEach(callback)
    • levelOrderForEach(callback)
  • Tree visualizer:
    • prettyPrint() for structured console output
  • Full driver script for demonstration and testing
  • Notes-style README.md with visuals, examples, and key takeaways

📁 File Structure Added:

binary-search-tree/
├── Node.js          # Node structure
├── Tree.js          # Balanced BST implementation
├── driver.js        # Demo and test runner
├── prettyPrint.js   # Visualizer for tree structure
└── README.md        # Notes + traversal explanations

📦 Version

  • Tag: v1.2.0
  • Target branch: main

✅ This release brings your core data structure collection even closer to full coverage.