xauravww.hashnode.devUnderstanding the Key Differences Between HTML and JSXIntroduction: The Illusion of HTML in JSX When you first see JSX, it looks like HTML. But here’s the trap: JSX is not HTML. Behind the scenes, JSX is JavaScript. // JSX (Looks like HTML) const element = <h1>Hello, world!</h1>; But in reality, it’s t...Nov 24, 2024·4 min read
xauravww.hashnode.devEfficiently Locate the First Bad Version of a Product with Binary SearchProblem Statement You're given a function isBadVersion(version) that returns whether a version is bad. You have a series of versions numbered from 1 to n, and your task is to find the first bad version. Once a version is bad, all the following versio...Sep 15, 2024·3 min read
xauravww.hashnode.devHow Binary Search Makes Number Guessing EasyProblem Statement You are playing a game where a number is picked from 1 to n, and you have to guess the picked number. For each guess you make, you are given feedback: If your guess is higher than the picked number, the API returns -1. If your gue...Sep 15, 2024·4 min read
xauravww.hashnode.devEfficient Binary Search Methods for 2D MatricesProblem Statement Given a matrix where: Integers in each row are sorted from left to right. The first integer of each row is greater than the last integer of the previous row. We need to determine whether a target integer exists in this matrix. Y...Sep 11, 2024·4 min read
xauravww.hashnode.devBinary Search Guide: Comparing Recursive and Iterative MethodsWhat is Binary Search? Binary search is a highly efficient algorithm used to locate a target value within a sorted array. By dividing the search space in half with each step, it reduces the time complexity to O(log n). In this blog, we'll explore bot...Sep 11, 2024·3 min read