Skip to content

Lets Code

  • Array
  • Bitwise
  • Database
  • Mysql
  • Redis
  • Design
  • Design Pattern
  • Dynamic Programming
  • Graph
  • Hashing
  • Linked List
  • Miscellaneous
    • Interesting Read
    • Math
    • Interview
    • InterviewBit
    • Concept
    • Maths
    • Puzzle
    • Random Problem
    • Random Topics
    • Resources
    • OS
    • Priority Queue
    • TODO
  • Python
  • Basic
  • Queue
  • Quora
  • Recursion
  • Search
  • Sorting
  • Stack
  • String
  • Tree
    • Trie
    • BST
    • Heap

Tag: Binary Tree

Heap – Theory

July 15, 2017November 27, 2017 ALeave a comment

Binary Heap is the underlying implementation of Priority Queue. A heap can be visualized to have a tree structure logically. This tree  satisfies the two heap properties - value property and the shape property. Although the heap is a tree, because of the heap property it's easy to implement it as an array. Binary Heap is… Continue reading Heap – Theory →

Binary Tree – Set 3

July 8, 2017March 17, 2020 A2 Comments

BT Set – 2,   BT Set – 1,   Question Set (101- ..) Binary Tree Visualizer ** Remove nodes on root to leaf paths of length < K. GFG Algo: We do a postorder traversal and in each iteration we also path the length till node. When we reach a leaf node, we check if the… Continue reading Binary Tree – Set 3 →

Binary Tree – Set 2

July 2, 2017March 16, 2020 A2 Comments

Imp -> 1, 3, 6, 8, 10, *11, 14, 15, 16, 18,  **23, 24, 25, **26, 27, 29, 31, 34, 35, 36, 43 Pending 27, 38 BT Set - 1, BT Set - 3 , Question Set(41-101) Binary Tree Visualizer *** Populate Inorder Successor for all nodes GFG Code Algo: 1. Traverse the given tree in reverse… Continue reading Binary Tree – Set 2 →

Self Balancing Binary Tree

July 2, 2017October 2, 2017 ALeave a comment

AVL Tree Implementation. Code. GFG - Insert, Delete  Youtube Time Complexity: The rotation operations (left and right rotate) take constant time as only few pointers are being changed there. Updating the height and getting the balance factor also take constant time. So the time complexity of AVL insert remains same as BST insert which is O(h) where… Continue reading Self Balancing Binary Tree →

Binary Tree – Set 1

June 29, 2017July 22, 2020 A3 Comments

InterviewBit Imp - 3, 4, 9, 10, 12, 15, 17, 19, 24, 27 Less Imp  - 8, 22, 25, 26 Pending - 14 BT Set - 2(42), BT Set - 3 (17), Question Set (1- 40) Binary Tree Visualizer *** Binary Tree Traversal. Depth First Traversals:  Code  GFG Time Complexity: O(n) where n is number of nodes in… Continue reading Binary Tree – Set 1 →

Search

Follow Lets Code on WordPress.com
Blog at WordPress.com.
  • Subscribe Subscribed
    • Lets Code
    • Already have a WordPress.com account? Log in now.
    • Lets Code
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

You must be logged in to post a comment.

    Design a site like this with WordPress.com
    Get started