VISHWANATH T Svishwanathts.hashnode.dev·Dec 14, 2024How to Solve the Square Root of X Using Python's Binary SearchIntuition To find the square root of a number x, we need the largest integer n such that (n^2 \leq x). Since the square root is monotonic (i.e., increasing as x increases), binary search is a natural choice to efficiently find the answer without test...Python
VISHWANATH T Svishwanathts.hashnode.dev·Dec 14, 2024How to Solve 'Add Binary' on LeetCode: A Step-by-Step GuideIntuition The problem involves adding two binary numbers represented as strings. My first thought was to convert the binary strings into integers, perform the addition, and then convert the result back into a binary string. Python's built-in function...Python
VISHWANATH T Svishwanathts.hashnode.dev·Dec 14, 2024How to Find the Length of the Last Word in a String: Python Solution for Leetcode.Intuition The problem requires finding the length of the last word in a string. A word is a sequence of non-space characters. My first thought was to remove any extra spaces from the input, split the string into words, and return the length of the la...Python
VISHWANATH T Svishwanathts.hashnode.dev·Dec 14, 2024Step-by-Step Guide to Solve Leetcode's Plus One Problem Using Python's map function.Intuition The problem involves adding 1 to a number represented as an array of digits. My first thought was to convert the list of digits into an integer, perform the addition, and then split the resulting number back into its digits. Using Python's ...leetcode
Dashika PVdashi.hashnode.dev·Dec 6, 202430 Days into JS - Day 1Create Hello World Function Write a function createHelloWorld. It should return a new function that always returns "Hello World". Function Syntax In JavaScript, there are two main ways to declare a function. One of which is to use the function ke...JavaScript
Saravana Sai saravanasai.hashnode.dev·Nov 22, 2024LeetCode Minimum Path Sum Explained: A Dynamic Programming ApproachIntroduction The "Minimum Path Sum" problem is a classic dynamic programming challenge commonly found on platforms like LeetCode. In this blog post, we will walk through the solution to the "Minimum Path Sum" problem step by step, using a dynamic pro...leetcode-solution
Vasant Mestryvasantmestry.hashnode.dev·Nov 7, 2024Day 2 of 30 days of JavaScript ChallengeHello guys welcome back to new series of JavaScript, where we‘ll be solving 30 days of JavaScript Questions from LeetCode. Here is link of all the problems In this series, we'll tackle each question one by one. I'll guide you by providing solutions a...30 days of JavaScript LeetcodeJavaScript
Vasant Mestryvasantmestry.hashnode.dev·Nov 6, 2024Day 1 of 30 Days JavaScript ChallengeHellooo guys, welcome back to new series of JavaScript, where we‘ll be solving 30 days of JavaScript Questions from Leetcode. Here is link of all the problems In this series, we'll tackle each question one by one. I'll guide you by providing solutio...1 like30 days of JavaScript Leetcode30 Days of Code
Ravi Kumarravikr126.hashnode.dev·Nov 4, 2024Kadane's Algorithms for FAANG interviewsLet's talk about the most popular and most asked interview questions. 👉 𝐅𝐢𝐧𝐝 𝐭𝐡𝐞 𝐦𝐚𝐱𝐢𝐦𝐮𝐦 𝐬𝐮𝐦 𝐨𝐟 𝐚 𝐜𝐨𝐧𝐭𝐢𝐠𝐮𝐨𝐮𝐬 𝐬𝐮𝐛𝐚𝐫𝐫𝐚𝐲. So how do you solve this question? 🤔So many approaches are there, but the most popular ...data structures
shohanur rahmanshohan777.hashnode.dev·Nov 2, 2024Leetcode 233 (Number of Digit One) was fun.This one is a math problem. And I enjoyed every bit of cracking the equation. The problem was, “Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.” At first I thought of doing recursi...leetcode