ProDeveloperTutorialonDecember 26, 2024 Find position of an element in an Infinite Sorted Array Question: You are given an array in sorted order, but it is infinite. You are also given an key element. You need to check if the element is…
ProDeveloperTutorialonDecember 26, 2024 Find Ceil of an element in a Sorted Array Question: You are given an array and a key. You need to return the Ceil of that element. What is Ceil? If you are given a number say…
ProDeveloperTutorialonDecember 26, 2024 Find Floor of an element in a Sorted Array Question: You are given an array and a key. You need to return the floor of that element. What is floor? If you are given a number say…
ProDeveloperTutorialonDecember 26, 2024 Searching in a Nearly Sorted Array Problem Statement: Given a sorted array where an element that should be present in i’th position, can be present in i-1’th…
ProDeveloperTutorialonDecember 26, 2024 Find the number of times a Sorted array is Rotated Question: You are given an array that is rotated clockwise, you need to find the number of times the array is rotated. Example 1: array = {5,…
ProDeveloperTutorialonDecember 26, 2024 Find the first and last occurrence of an element Question: Given an array sorted in ascending order with repeated elements and given the key. Find the first and last occurrence of that key.…
ProDeveloperTutorialonDecember 26, 2024 Order-Agnostic Binary Search Question: Given an array whose order of sorting is unknown and a key. You need to check if the key is present or not using binary search.…
ProDeveloperTutorialonDecember 26, 2024 Binary search on an array that is in descending order Question: Given an array in descending order and a key. You need to check if the key is present or not using binary search. Example: Array =…
ProDeveloperTutorialonDecember 26, 2024 Get the count full nodes in a Binary Problem statement: You are given root node of a tree and you need to find the number of full node in that tree. A node will be considered as…
ProDeveloperTutorialonDecember 26, 2024 Get count Non-Leaf nodes in a Binary Tree Problem statement: You are given root node of a tree and you need to find the number of non leaf node in that tree. Consider the image below:…