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 =…
ProDeveloperTutorialonJanuary 14, 2025 Missing Number Problem statement: You are given an array of numbers from 1 to n, in any order, one number will be missing. You need to find a missing number.…
ProDeveloperTutorialonJanuary 14, 2025 Power of 2 Given a number, you need to check if the number is a power of 2, return true or false accordingly. Example: Input: 1 Output: True Because 2^0…
ProDeveloperTutorialonJanuary 14, 2025 Count the number of set bits Problem statement: You are given a number, return the number of set bits if that number, when represented that number in binary format.…
ProDeveloperTutorialonJanuary 14, 2025 Reverse Bits Problem Statement: You are given a number as input. You need to reverse the bits in it’s binary form and print the output. The maximum length…
ProDeveloperTutorialonDecember 26, 2024 Count the number of 1’s in an array sorted in decreasing order. Question: You are given an array that is sorted in decreasing order and has only 0’s and 1’s. You need to find the number of…
ProDeveloperTutorialonDecember 26, 2024 Get the rotation count in sorted rotated array Problem Statement: You are given an array, you need to check if the array is sorted and rotated. Example: array = {6, 7, 1, 2, 3, 4, 5}…