Simran Anandsimranblogss.hashnode.dev·Apr 20, 2024"Mastering Binary Search Trees: A Java Journey Through Efficient Data Structures"An elaborate blog article explaining the concepts of binary search tree, its various applications, operations that can be performed and example use cases with details covered in my YouTube video! Introduction A Binary Search Tree (BST) is a fundament...Discuss·10 likes·34 readsJava
Lucalijucay.hashnode.dev·Apr 16, 2024Bits & Beyond 4: Binary treesLast time, we learned about the basics of data structures. In this entry of Bits & Beyond, we will learn about binary trees. Binary trees are a part of data structures but given its amount of information, you have to learn, I decided to make an extra...DiscussBits & Beyond: Journey into programmingBinaryTrees
Chetan Dattachetan77.hashnode.dev·Mar 24, 2024Find Nth Root Of MProblem statement You are given two positive integers 'n' and 'm'. You have to return the 'nth' root of 'm', i.e. 'm(1/n)'. If the 'nth root is not an integer, return -1. (link) Note: 'nth' root of an integer 'm' is a number, which, when raised to th...DiscussLeetcodeleetcode
Chetan Dattachetan77.hashnode.dev·Mar 20, 2024540. Single Element in a Sorted ArrayProblem You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. Return the single element that appears only once. Your solution must run in O(log n) time a...Discusssingle-element-in-a-sorted-array
Chetan Dattachetan77.hashnode.dev·Mar 12, 202434. Find First and Last Position of Element in Sorted ArrayGiven an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1]. You must write an algorithm with O(log n) runtime complexity. (link) ...DiscussLeetcodelower bound
Chetan Dattachetan77.hashnode.dev·Mar 5, 2024Lower and Upper Bound - Binary SearchI Lower Bound Problem You are given an array 'arr' sorted in non-decreasing order and a number 'x'. You must return the index of lower bound of 'x'. (link) Note: For a sorted array 'arr', 'lower_bound' of a number 'x' is defined as the smallest index...DiscussLeetcodeBinary Search Algorithm
Rafiul Hasanraphy.hashnode.dev·Feb 26, 2024Kth Smallest Element in a Row-wise and Column-wise Sorted MatrixProblem Link: LeetCode We are given a matrix in which the rows are sorted, and columns are sorted. WE have to find the kth smallest element in the matrix. There are many approaches. Applying Binary Search is one of them. Its time complexity is bit be...Discussleetcode
Chetan Dattachetan77.hashnode.dev·Feb 26, 2024704. Binary SearchProblem Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1. You must write an algorithm with O(log n) run...DiscussLeetcodebinary search
Ritwik Mathritwikmath.hashnode.dev·Feb 17, 2024Binary Search in PythonBinary Search: The concept of binary search is like finding a word in a dictionary. Imagine you're looking for a particular word, and the dictionary is sorted alphabetically. Initial Guess: You open the dictionary roughly in the middle and check the...Discussritwikmath
Chetan Dattachetan77.hashnode.dev·Jan 16, 20244. Median of Two Sorted ArraysProblem Statement Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). (link) Example 1: Input: nums1 = [1,3], nums2 = [2] Output: 2....DiscussLeetcodeMedian of Two Sorted Arrays