ProDeveloperTutorialonJanuary 15, 2025 Height or Max depth if a BTree In this chapter we shall calculate the height of a Binary Tree. Problem Statement: Given the root node of binary tree, calculate the height of…
ProDeveloperTutorialonJanuary 15, 2025 Vertical Order Traversal In this tutorial we shall see how to do vertical order traversal. Problem Statement: You are given a root node of a tree, you need to print…
ProDeveloperTutorialonJanuary 14, 2025 Level Order Traversal In this tutorial we shall see how to print level by level of the tree nodes. Problem Statement: Given the root node of the tree, print the…
ProDeveloperTutorialonJanuary 14, 2025 Left view and right view of a Binary Tree Problem Statement: Given a binary tree, print the left and right view of the tree. For example: If you have a tree as below: The left view…
ProDeveloperTutorialonJanuary 14, 2025 Top view of a binary tree In this chapter we shall learn how to print top view of a binary tree. Problem Statement: You are given a root node of the tree print the top…
ProDeveloperTutorialonJanuary 14, 2025 Boundary Traversal of Binary Tree We shall solve boundary traversal of binary tree in this tutorial. Problem Statement: Given a binary tree, list all the nodes that come in the…
ProDeveloperTutorialonJanuary 14, 2025 Bottom view of binary Tree In this tutorial, we shall solve how to print bottom view of a binary tree. Problem statement: You are given a binary tree; you need to print…
ProDeveloperTutorialonJanuary 14, 2025 Bitwise and of number range You are given a number range, you need to find the bitwise and of all the numbers in the range. Example: [5, 7] The bitwise and of 5, 6, 7…
ProDeveloperTutorialonJanuary 14, 2025 Hamming Distance You are given 2 integers, and you need to return the count at which the bits are different in their binary form. Consider 8 and 1 As…
ProDeveloperTutorialonJanuary 14, 2025 Counting set bits in a number You are given a number; you need to create an array to fill the number of 1’s present in their binary format. Example: Input n = 3 Output =…