Rakesh PeddamalluAboutProjectsBlogLeetcode Company WiseContact

From the blog

  • By rakeshreddy512 | September 15, 2025

    Leetcode - 23. Merge k Sorted Lists

    When working with linked lists, a classic problem youโ€™ll encounter is: โ€œGiven k sorted linked......

  • By rakeshreddy512 | September 9, 2025

    Leetcode - 427. Construct Quad Tree

    QuadTrees are a fascinating data structure, often used in image compression, spatial indexing, and......

  • By rakeshreddy512 | September 1, 2025

    Leetcode - 148. Sort List

    Sorting a linked list isnโ€™t as straightforward as sorting an array. With arrays, we can do quick sort......

  • By rakeshreddy512 | August 31, 2025

    Backend Interview Prep Beyond LeetCode (For 3 Years Experience)

    Most backend engineers spend months grinding LeetCode. But in reality, backend interviews are about......

  • By rakeshreddy512 | August 31, 2025

    Frontend Interview Prep Beyond LeetCode (For 3 Years Experience)

    Most developers preparing for frontend interviews drown themselves in LeetCode. While data structures......

  • By rakeshreddy512 | August 31, 2025

    Leetcode - 108. Convert Sorted Array to Binary Search Tree

    When youโ€™re given a sorted array, you might be asked to convert it into a height-balanced binary......

  • By rakeshreddy512 | August 31, 2025

    Leetcode -79. Word Search

    The Word Search problem is a classic interview question that tests recursion, grid traversal, and......

  • By rakeshreddy512 | August 31, 2025

    22. Generate Parentheses

    Got it, Rakesh ๐Ÿš€ Letโ€™s turn this into a neat blog post. Iโ€™ll explain the problem, walk through the......

  • By rakeshreddy512 | August 30, 2025

    Leetcode - 52. N-Queens II

    ๐Ÿฐ Solving the N-Queens Problem with Backtracking The N-Queens problem is a classic in......

  • By rakeshreddy512 | August 30, 2025

    Leetcode - 39. Combination Sum

    The Combination Sum problem is a classic backtracking question from LeetCode (#39). We are......

  • By rakeshreddy512 | August 24, 2025

    46. Permutations

    Understanding Permutations in JavaScript (Step by Step) Permutations are all the possible......

  • By rakeshreddy512 | August 24, 2025

    Leetcode - 77. Combinations

    Problem Given two integers n and k, return all possible combinations of k numbers chosen......

  • By rakeshreddy512 | August 23, 2025

    Leetcode - 17. Letter Combinations of a Phone Number

    Ever wondered how your phone predicts words when youโ€™re typing on a numeric keypad? Thatโ€™s exactly......

  • By rakeshreddy512 | August 21, 2025

    Leetcode - 212. Word Search II

    Solving Word Search II with Trie and DFS Finding words in a 2D board may sound like a fun......

  • By rakeshreddy512 | August 21, 2025

    Leetcode - 211. Design Add and Search Words Data Structure

    ๐Ÿ”Ž Word Dictionary with Wildcards โ€” Trie + DFS Approach Imagine youโ€™re building a search......

  • By rakeshreddy512 | August 8, 2025

    Leetcode - 208. Implement Trie (Prefix Tree)

    โœจ What is a Trie? A Trie (pronounced like "try") is a special type of tree used to store......

  • By rakeshreddy512 | August 7, 2025

    Leetcode - 127. Word Ladder

    ๐Ÿ”— Solving the Word Ladder Problem Using BFS in JavaScript The Word Ladder problem is a......

  • By rakeshreddy512 | August 7, 2025

    Leetcode - 433. Minimum Genetic Mutation

    ๐Ÿ” Problem Overview Imagine youโ€™re playing a game where you can mutate genes by changing......

  • By rakeshreddy512 | August 6, 2025

    Leetcode - 909. Snakes and Ladders

    Approach We treat the Snakes and Ladders board as an unweighted graph: Each square = a......

  • By rakeshreddy512 | August 5, 2025

    Leetcode - 210. Course Schedule II

    If you've ever tried stacking books in the correct order without violating any โ€œpre-readโ€ rule (e.g.,......

  • By rakeshreddy512 | July 30, 2025

    399. Evaluate Division

    ๐Ÿ” Problem Overview We are given equations like: a / b = 2.0 b / c = 3.0 Enter......

  • By rakeshreddy512 | July 14, 2025

    JavaScript Built-in Method Cheat Sheet

    JavaScript Built-in Method Cheat Sheet Ever find yourself in the middle of a LeetCode......

  • By rakeshreddy512 | July 13, 2025

    Leetcode - 130. Surrounded Regions

    ๐Ÿš€ Approach We use a Breadth-First Search (BFS) approach starting from the border 'O's. Any......

  • By rakeshreddy512 | July 12, 2025

    Leetcode - 200. Number of Islands

    ๐Ÿ” Approach: BFS We traverse each cell in the grid. When we encounter a land cell ("1")......

  • By rakeshreddy512 | July 12, 2025

    Leetcode - 98. Validate Binary Search Tree

    ๐ŸŒฒ Two Elegant Ways to Validate a Binary Search Tree (BST) in JavaScript A Binary Search......

  • By rakeshreddy512 | July 12, 2025

    Leetcode - 230. Kth Smallest Element in a BST

    ๐Ÿง  Approach: Inorder Traversal (Because BST is Sorted Inorder) In a BST, an inorder......

  • By rakeshreddy512 | July 12, 2025

    530. Minimum Absolute Difference in BST

    ๐Ÿง  Approach: Inorder Traversal (Sorted View of BST) In a BST, an inorder traversal gives us......

  • By rakeshreddy512 | July 12, 2025

    Leetcode - 103. Binary Tree Zigzag Level Order Traversal

    ๐Ÿง  Approach: BFS with Direction Flag This is a slight variation of Level Order Traversal......

  • By rakeshreddy512 | July 12, 2025

    Leetcode - 102. Binary Tree Level Order Traversal

    ๐Ÿง  Approach: Breadth-First Search (BFS) This is a textbook case for BFS using a queue. You......

  • By rakeshreddy512 | July 12, 2025

    Leetcode - 637. Average of Levels in Binary Tree

    ๐Ÿง  Approach: Level Order Traversal (BFS) We use Breadth-First Search (BFS) to traverse the......

  • By rakeshreddy512 | July 12, 2025

    Leetcode - 199. Binary Tree Right Side View

    ๐Ÿง  Approach: Level Order Traversal (BFS) We use Breadth-First Search (BFS) โ€” traverse the......

  • By rakeshreddy512 | July 12, 2025

    Leetcode - 347. Top K Frequent Elements

    ๐Ÿš€ Approach: Bucket Sort (Linear Time) Instead of sorting elements by frequency (which......

  • By rakeshreddy512 | July 10, 2025

    Leetcode - 236. Lowest Common Ancestor of a Binary Tree

    ๐Ÿงญ Intuition Behind the Recursive Approach Hereโ€™s the deal. Weโ€™re going to: Start at the......

  • By rakeshreddy512 | July 9, 2025

    Leetcode - 222. Count Complete Tree Nodes

    ๐Ÿง  Intuition When you're at any node: Count yourself โ†’ thatโ€™s 1 Count everything in your......

  • By rakeshreddy512 | July 9, 2025

    Leetcode - 173. Binary Search Tree Iterator

    ๐Ÿง  Approach Why In-order? In-order traversal (Left โ†’ Root โ†’ Right) returns......

  • By rakeshreddy512 | May 8, 2025

    Leetcode - 124. Binary Tree Maximum Path Sum

    When working with binary trees, it's common to process each node with post-order traversal (left โ†’......

  • By rakeshreddy512 | May 2, 2025

    Leetcode - 129. Sum Root to Leaf Numbers

    Approach To solve this problem, we can use a Depth-First Search (DFS) strategy to traverse......

  • By rakeshreddy512 | April 30, 2025

    Leetcode - 112. Path Sum

    ๐Ÿง  Approach: Recursive DFS To determine if a path from root to leaf equals a target sum, we......

  • By rakeshreddy512 | April 27, 2025

    Leetcode - 114. Flatten Binary Tree to Linked List

    Hey everyone! ๐Ÿ‘‹ Today, letโ€™s dive deep into a classic tree problem โ€” flattening a binary tree into a......

  • By rakeshreddy512 | April 24, 2025

    ๐Ÿง  The Ultimate FAANG Backend Developer Roadmap โ€“ For Mid-Level Engineers (2025 Edition)

    If you're a backend engineer with 2โ€“4 years of experience and dreaming of joining FAANG or a top-tier......

  • By rakeshreddy512 | April 24, 2025

    Leetcode - 117. Populating Next Right Pointers in Each Node II

    Approach The breadth-first search (BFS) approach is ideal for this problem. By performing......

  • By rakeshreddy512 | April 24, 2025

    Leetcode - 106. Construct Binary Tree from Inorder and Postorder Traversal

    Reconstructing a binary tree from its inorder and postorder traversal is a classic recursive problem......

  • By rakeshreddy512 | April 24, 2025

    Mastering `height: calc()` in CSS: Dynamic Layouts Made Easy

    In modern web design, flexibility is key. Whether you're building a responsive dashboard, a......

  • By rakeshreddy512 | April 22, 2025

    Leetcode - 105. Construct Binary Tree from Preorder and Inorder Traversal

    Constructing a binary tree from preorder and inorder traversal is a classic problem that teaches......

  • By rakeshreddy512 | April 21, 2025

    ๐Ÿ’ช 4 Protein-Rich Smoothies to Build Muscle & Burn Fat (Tried & Tested

    Smoothies arenโ€™t just Instagram foodโ€”they're seriously powerful when it comes to fitness......

  • By rakeshreddy512 | April 21, 2025

    Leetcode - 101. Symmetric Tree

    Checking if a binary tree is symmetric is a classic recursive problem in data structures. In this......

  • By rakeshreddy512 | April 21, 2025

    Protein Content in Common Food Sources: A Simple Guide for Everyday Eating

    Protein is essential for building muscle, repairing tissues, and maintaining a healthy metabolism.......

  • By rakeshreddy512 | April 19, 2025

    Leetcode - 226. Invert Binary Tree

    One of the most elegant problems in tree manipulation is inverting a binary tree โ€” essentially......

  • By rakeshreddy512 | April 19, 2025

    Leetcode - 100. Same Tree

    The โ€œSame Treeโ€ problem is a classic interview question that tests your understanding of tree......

  • By rakeshreddy512 | April 17, 2025

    Leetcode - 104. Maximum Depth of Binary Tree

    Finding the maximum depth (or height) of a binary tree is one of the most classic problems in tree......

  • By rakeshreddy512 | April 15, 2025

    The Ultimate CSS Roadmap for Frontend Developers (2025 Edition

    If you're diving into UI/Frontend development or want to level up your styling skills, mastering CSS......

  • By rakeshreddy512 | April 15, 2025

    Mastering CSS Position and Display: A Visual Guide for Developers

    Intro: CSS layout properties like position and display often confuse developers, especially when......

  • By rakeshreddy512 | April 14, 2025

    ๐Ÿ” From Data to Decisions: Understanding Binary Search Trees in JavaScript

    In the last two posts, we covered what binary trees are and how to traverse them. Now itโ€™s time to......

  • By rakeshreddy512 | April 14, 2025

    ๐ŸŒณ Traversing Binary Trees Like a Pro: DFS vs. BFS Explained Visually

    Now that weโ€™ve covered the basics of binary trees in our first post, it's time to dive into......

  • By rakeshreddy512 | April 14, 2025

    ๐ŸŒณ Binary Trees Demystified: A Beginnerโ€™s Guide Using JavaScript

    If youโ€™ve ever scratched your head at the mention of binary trees or felt overwhelmed by tree data......

  • By rakeshreddy512 | April 14, 2025

    Leetcode - 146. LRU Cache

    ๐Ÿ” Building an LRU Cache in JavaScript (The Right Way) Imagine you're building a browser,......

  • By rakeshreddy512 | April 13, 2025

    Leetcode - 86. Partition List

    ๐Ÿ” Approach To solve this cleanly, we use the two-pointer technique: Create two dummy......

  • By rakeshreddy512 | April 13, 2025

    Leetcode - 61. Rotate List

    ๐Ÿ”„ Approach: Calculate the length of the list. Connect the tail to the head to make it......

  • By rakeshreddy512 | April 12, 2025

    40 Profound TV Series That Will Actually Improve You

    If you're like me, you want your screen time to be meaningfulโ€”not just mindless entertainment. Some......

  • By rakeshreddy512 | April 11, 2025

    Leetcode - 82. Remove Duplicates from Sorted List II

    ๐Ÿ’ก Approach The idea is to remove all nodes that have duplicate values, even the first......

  • By rakeshreddy512 | April 10, 2025

    ๐ŸŽจ Mastering CSS Selectors: How to Target Only What You Want

    Ever wondered why a CSS style you wrote is affecting everything โ€” or nothing at all? Thatโ€™s because......

  • By rakeshreddy512 | April 9, 2025

    Leetcode - 19. Remove Nth Node From End of List

    You're given a singly linked list. Your task is to remove the nth node from the end and return the......

  • By rakeshreddy512 | April 9, 2025

    Custom Theming in Ant Design v5 with Dynamic Theme Switching

    Ant Design v5 introduced a powerful theming system built around design tokens, making it easier than......

  • By rakeshreddy512 | April 8, 2025

    Future-Proofing Your Software Career in the Age of AI

    As artificial intelligence continues to evolve, many developers are wondering: "Will AI take over my......

  • By rakeshreddy512 | April 8, 2025

    Leetcode - 25. Reverse Nodes in k-Group

    ๐Ÿ’ก Approach The idea is to reverse each group of k nodes while maintaining the correct......

  • By rakeshreddy512 | April 3, 2025

    Leetcode - 206. Reverse Linked List

    Reversing a linked list is a common problem in coding interviews and data structures. In this blog,......

  • By rakeshreddy512 | April 3, 2025

    Leetcode - 92. Reverse Linked List II

    Approach Find the leftPrev Node** Create a dummy node to handle edge cases (like when......

  • By rakeshreddy512 | April 2, 2025

    Mastering React Design Patterns: HOC, Render Props, and Compound Components

    Introduction React is one of the most popular frontend libraries, known for its......

  • By rakeshreddy512 | April 2, 2025

    Understanding Redux Slices: A Beginner-Friendly Guide

    Redux has been the go-to state management library for React applications, but traditional Redux......

  • By rakeshreddy512 | April 2, 2025

    Micro Frontend Architecture Explained

    Microfrontend architecture allows breaking a monolithic frontend into smaller, independent apps that......

  • By rakeshreddy512 | April 2, 2025

    React Context API vs Redux: Which One Should You Use?

    When managing state in a React application, two common approaches are React Context API and Redux.......

  • By rakeshreddy512 | March 31, 2025

    The Ultimate Guide to Losing Fat While Gaining Muscle (Body Recomposition)

    Introduction Many people believe that you can either lose fat or gain muscleโ€”but not both......

  • By rakeshreddy512 | March 29, 2025

    How to Become Super Smart, Mentally Strong, and Boost Brain Power

    How to Become Super Smart, Mentally Strong, and Boost Brain Power Introduction Many people believe......

  • By rakeshreddy512 | March 27, 2025

    Food Delivery System โ€“ Low Level Design (Cleartax Machine Coding Round)

    Low-Level Design (LLD) of ClearFood in JavaScript Introduction ClearFood is a......

  • By rakeshreddy512 | March 27, 2025

    what is webpack ?

    Webpack is a module bundler for JavaScript applications. It takes all your files (JavaScript, CSS,......

  • By rakeshreddy512 | March 24, 2025

    Leetcode - 138. Copy List with Random Pointer

    Copy List with Random Pointer โ€“ JavaScript Approach Problem Statement You are......

  • By rakeshreddy512 | March 22, 2025

    Leetcode - 21. Merge Two Sorted Lists

    # Merging Two Sorted Linked Lists: Approach, Complexity, and Code Merging two sorted linked lists is......

  • By rakeshreddy512 | March 21, 2025

    Workout and Diet based on Inbody Report

    ๐Ÿ’ช Complete Exercise & Nutrition Plan for Muscle Growth & Fat Loss (Based on Your......

  • By rakeshreddy512 | March 21, 2025

    Leetcode - 2. Add Two Numbers

    Understanding Carry in Linked List Addition Key Concepts Numbers are stored in......

  • By rakeshreddy512 | March 21, 2025

    Creating and Working with Linked Lists in JavaScript

    Creating and Working with Linked Lists in JavaScript Introduction In......

  • By rakeshreddy512 | March 21, 2025

    Leetcode - 150. Evaluate Reverse Polish Notation

    Evaluating Reverse Polish Notation (RPN) โ€“ Approach & Learnings ......

  • By rakeshreddy512 | March 21, 2025

    Leetcode - 155. Min Stack

    Implementing MinStack in JavaScript Problem Statement Design a stack that......

  • By rakeshreddy512 | March 21, 2025

    Leetcode - 71. Simplify Path

    Using Stack /** * @param {string} path * @return {string} */ var simplifyPath = function (path)......

  • By rakeshreddy512 | March 21, 2025

    Leetcode - 20. Valid Parentheses

    Approach We loop through chars of s , if its a closing bracket we compare with last element in stack......

  • By rakeshreddy512 | March 21, 2025

    Leetcode - 452. Minimum Number of Arrows to Burst Balloons

    Intuition The problem requires us to find the minimum number of arrows needed to burst all......

  • By rakeshreddy512 | March 20, 2025

    Leetcode - 57. Insert Interval

    Javascript Code /** * @param {number[][]} intervals * @param {number[]} newInterval * @return......

  • By rakeshreddy512 | March 18, 2025

    Leetcode - 56. Merge Intervals

    Using Sorting Chapter 1 /** * @param {number[][]} intervals * @return {number[][]} ......

  • By rakeshreddy512 | March 18, 2025

    Leetcode - 228. Summary Ranges

    Two Pointer Approach Javascript Code /** * @param {number[]} nums * @return {string[]} */ var......

  • By rakeshreddy512 | March 18, 2025

    Javascript - Basics of using built-in Set method

    JavaScript Set - Concise Notes ๐Ÿš€ ๐Ÿ”น What is a Set? A Set is a built-in......

  • By rakeshreddy512 | March 18, 2025

    Leetcode - 128. Longest Consecutive Sequence

    Javascript Code /** * @param {number[]} nums * @return {number} */ var longestConsecutive =......

  • By rakeshreddy512 | March 18, 2025

    Leetcode - 219. Contains Duplicate II

    Javascript Code /** * @param {number[]} nums * @param {number} k * @return {boolean} */ var......

  • By rakeshreddy512 | March 18, 2025

    Leetcode - 202. Happy Number

    Using Hashmap Store all the numbers , and check for repeated number if repetition occurs then its......

  • By rakeshreddy512 | March 18, 2025

    Leetcode - 1. Two Sum

    Using Hashmap (Optimal solution) /** * @param {number[]} nums * @param {number} target *......

  • By rakeshreddy512 | March 18, 2025

    Leetcode - 49. Group Anagrams

    Using Sorting /** * @param {string[]} strs * @return {string[][]} */ var groupAnagrams =......

  • By rakeshreddy512 | March 17, 2025

    Leetcode - 242. Valid Anagram

    Approach 1 /** * @param {string} s * @param {string} t * @return {boolean} */ var isAnagram =......

  • By rakeshreddy512 | March 17, 2025

    Leetcode - 290. Word Pattern

    Javascript Code /** * @param {string} pattern * @param {string} s * @return {boolean} */ var......

  • By rakeshreddy512 | March 17, 2025

    Leetcode - 205. Isomorphic Strings

    Javascript Code /** * @param {string} s * @param {string} t * @return {boolean} */ var......

  • By rakeshreddy512 | March 17, 2025

    OAuth vs SAML

    Let's break it down: OAuth and SAML are both protocols used for authentication and authorization, but......

  • By rakeshreddy512 | March 17, 2025

    Sockets Basics

    ๐Ÿ“ Notes on Sockets and Their Importance What is a Socket? A socket is a......

  • By rakeshreddy512 | March 17, 2025

    Leetcode - 383. Ransom Note

    ๐Ÿš€ JavaScript Map (HashMap) Basics Definition: A Map stores key-value pairs and maintains......

  • By rakeshreddy512 | March 17, 2025

    Leetcode - 289. Game of Life

    Cell State Mapping: Original State New State Transitional Value Meaning 1......

  • By rakeshreddy512 | March 16, 2025

    Big O cheat sheet

    A post by Rakesh Reddy Peddamallu...

  • By rakeshreddy512 | March 12, 2025

    Leetcode - 73. Set Matrix Zeroes

    Javascript Code /** * @param {number[][]} matrix * @return {void} Do not return anything, modify......

  • By rakeshreddy512 | March 10, 2025

    Leetcode - 48. Rotate Image

    /** * @param {number[][]} matrix * @return {void} Do not return anything, modify matrix in-place......

  • By rakeshreddy512 | March 9, 2025

    System Design resources for Interview Preparation

    awesome-system-design-resources system-design-primer...

  • By rakeshreddy512 | March 8, 2025

    Diet plan to reduce body fat

    Goal: Reduce Body Fat (from 26% to ~15-18%) While Maintaining Muscle Since you are 75 kg......

  • By rakeshreddy512 | March 8, 2025

    Leetcode - 54. Spiral Matrix

    Javascript Code /** * @param {number[][]} matrix * @return {number[]} */ var spiralOrder =......

  • By rakeshreddy512 | March 7, 2025

    Backend Interview strategy

    Here's a structured plan to help you prepare effectively: 1. Data Structures &......

  • By rakeshreddy512 | March 7, 2025

    Backend Interview preparation plan - 6 week

    Hereโ€™s a detailed 6-week backend interview preparation plan tailored for 3 years of experience: ......

  • By rakeshreddy512 | March 3, 2025

    Leetcode - 36. Valid Sudoku

    Javascript Code /** * @param {character[][]} board * @return {boolean} */ const checkInRow =......

  • By rakeshreddy512 | March 3, 2025

    Leetcode - 76. Minimum Window Substring

    Javascript Code /** * @param {string} s - The input string * @param {string} t - The target......

  • By rakeshreddy512 | March 3, 2025

    Leetcode - 30. Substring with Concatenation of All Words

    Javascript Code /** * @param {string} s * @param {string[]} words * @return {number[]} */ var......

  • By rakeshreddy512 | March 3, 2025

    Leetcode - 3. Longest Substring Without Repeating Characters

    Javascript Code /** * @param {string} s * @return {number} */ var lengthOfLongestSubstring =......

  • By rakeshreddy512 | March 2, 2025

    Leetcode - 209. Minimum Size Subarray Sum

    /** * @param {number} target * @param {number[]} nums * @return {number} */ var minSubArrayLen =......

  • By rakeshreddy512 | March 2, 2025

    Leetcode - 15. 3Sum

    Javascript Code /** * @param {number[]} nums * @return {number[][]} */ var threeSum = function......

  • By rakeshreddy512 | March 2, 2025

    Leetcode - 11. Container With Most Water

    Javascript Code /** * @param {number[]} height * @return {number} */ var maxArea = function......

  • By rakeshreddy512 | March 1, 2025

    Leetcode - 167. Two Sum II - Input Array Is Sorted

    Javascript Code /** * @param {number[]} numbers * @param {number} target * @return {number[]} ......

  • By rakeshreddy512 | March 1, 2025

    Leetcode - 125. Valid Palindrome

    Javascript Code /** * @param {string} s * @return {boolean} */ var isPalindrome = function (s)......

  • By rakeshreddy512 | March 1, 2025

    Leetcode - 68. Text Justification

    Javascript Code /** * @param {string[]} words * @param {number} maxWidth * @return {string[]} ......

  • By rakeshreddy512 | March 1, 2025

    Leetcode - 28. Find the Index of the First Occurrence in a String

    Javascript Code var strStr = function (haystack, needle) { if (needle.length === 0) return 0; ......

  • By rakeshreddy512 | February 28, 2025

    Leetcode - 6. Zigzag Conversion

    /** * @param {string} s * @param {number} numRows * @return {string} */ var convert =......

  • By rakeshreddy512 | February 26, 2025

    Leetcode - 14. Longest Common Prefix

    Javascript Code Considering the first word as a whole as prefix ; we iterate for a mismatch and......

  • By rakeshreddy512 | February 26, 2025

    Leetcode - 58. Length of Last Word

    /** * @param {string} s * @return {number} */ var lengthOfLastWord = function(s) { let words......

  • By rakeshreddy512 | February 26, 2025

    Leetcode - 12. Integer to Roman

    /** * @param {number} num * @return {string} */ var intToRoman = function(num) { let......

  • By rakeshreddy512 | February 26, 2025

    Leetcode - 13. Roman to Integer

    Explanation The trick is IV is 4 because , I which is 1 is less than V which is 5 so we check in the......

  • By rakeshreddy512 | February 24, 2025

    Leetcode - 42. Trapping Rain Water

    Mathematical function Javascript code /** * @param {number[]} height * @return {number} */ var......

  • By rakeshreddy512 | February 24, 2025

    Leetcode - 135. Candy

    /** * @param {number[]} ratings * @return {number} */ var candy = function(ratings) { const......

  • By rakeshreddy512 | February 23, 2025

    Leetcode - 134. Gas Station

    /** * @param {number[]} gas * @param {number[]} cost * @return {number} */ var......

  • By rakeshreddy512 | January 28, 2025

    Leetcode - 380. Insert Delete GetRandom O(1)

    class RandomizedSet{ constructor() { this.hashMap = new Map() this.list = []; ......

  • By rakeshreddy512 | January 26, 2025

    Leetcode - 274. H-Index

    /** * @param {number[]} citations * @return {number} */ var hIndex = function(citations) { ......

  • By rakeshreddy512 | January 26, 2025

    Leetcode - 45. Jump Game II

    The question says that we can be always able to reach the end , only that we need to find is the min......

  • By rakeshreddy512 | January 25, 2025

    Leetcode - 55. Jump Game

    so this is a greedy approach our goal is to reach the last index , so we try to reach to index......

  • By rakeshreddy512 | January 25, 2025

    Leetcode - 121. Best Time to Buy and Sell Stock

    /** * @param {number[]} prices * @return {number} */ var maxProfit = function(prices) { ......

  • By rakeshreddy512 | January 25, 2025

    Leetcode - 189. Rotate Array

    Naive Approach In this i'm just using an extra array to store /** * @param {number[]} nums *......

  • By rakeshreddy512 | January 25, 2025

    Leetcode - 169. Majority Element

    Is it possible to do in O(1) time complexity ? There are multiple ways to solve this problem One......

  • By rakeshreddy512 | January 24, 2025

    Leetcode - 80. Remove Duplicates from Sorted Array II

    /** * @param {number[]} nums * @return {number} */ var removeDuplicates = function(nums) { ......

  • By rakeshreddy512 | January 23, 2025

    Leetcode - 26. Remove Duplicates from Sorted Array

    There are multiple ways to solve this but we need to solve it in inplace as mentioned in the problem......

  • By rakeshreddy512 | September 18, 2024

    Salary breakdown in india

    A post by Rakesh Reddy Peddamallu...

  • By rakeshreddy512 | September 12, 2024

    Leetcode - 392. Is Subsequence

    Since we need to check every character of s to be sequentially present in t , if we find the......

  • By rakeshreddy512 | September 12, 2024

    Leetcode - 283. Move Zeroes

    Naive Approach /** * @param {number[]} nums * @return {void} Do not return anything, modify nums......

  • By rakeshreddy512 | September 11, 2024

    Leetcode - 443. String Compression

    Need to update the solution Please read the question completely before going through the......

  • By rakeshreddy512 | September 11, 2024

    Leetcode - 334. Increasing Triplet Subsequence

    Tried this but not a right solution /** * @param {number[]} nums * @return {boolean} */ var......

  • By rakeshreddy512 | September 10, 2024

    Leetcode - 238. Product of Array Except Self

    So we should not be using the division operator as the question says but adding the code......

  • By rakeshreddy512 | September 10, 2024

    Leetcode - 151. Reverse Words in a String

    Naive Approach /** * @param {string} s * @return {string} */ var reverseWords = function(s) { ......

  • By rakeshreddy512 | September 10, 2024

    Leetcode - 345. Reverse Vowels of a String

    Naive Approach /** * @param {string} s * @return {string} */ var reverseVowels = function(s)......

  • By rakeshreddy512 | September 10, 2024

    Leetcode - 605. Can Place Flowers

    To solve the problem we are going to iterate through the flowerbed and check for 3 things , left ,......

  • By rakeshreddy512 | September 9, 2024

    Leetcode - 1431. Kids With the Greatest Number of Candies

    Got the brute force solution Javascript Code /** * @param {number[]} candies * @param {number}......

  • By rakeshreddy512 | September 9, 2024

    Leetcode - 1071. Greatest Common Divisor of Strings

    Approach -> String is considered as divisor , when the lengths of both strings str1 and str2 is......

  • By rakeshreddy512 | September 9, 2024

    Leetcode - 1768. Merge Strings Alternately

    Heres , the solution try to understand the code ๐Ÿ™ƒ /** * @param {string} word1 * @param {string}......

  • By rakeshreddy512 | September 2, 2024

    Preparation Plan - SDE2

    Follow SDE2 Guide Grokking System Design Fundamentals Grokking the System Design......

  • By rakeshreddy512 | August 29, 2024

    What is API Gateway ?

    Today we will go through another fundamental component of system design , API Gateway It is an......

  • By rakeshreddy512 | June 24, 2024

    Leetcode - 207. Course Schedule

    U can read the question properly and give a try once before coming to the solution Incase you have......

  • By rakeshreddy512 | June 24, 2024

    Leetcode - 503. Next Greater Element II

    key - in order to start in circular way -> generally we iterate starting from i=0 , j = (i+1) ......

  • By rakeshreddy512 | June 24, 2024

    Leetcode - 929. Unique Email Addresses

    Lets quickly go into the solution for the unique email addresses problem we can see every email in......

  • By rakeshreddy512 | November 14, 2023

    Leetcode - 133. Clone Graph

    /** * // Definition for a Node. * function Node(val, neighbors) { * this.val = val ===......

  • By rakeshreddy512 | November 13, 2023

    Leetcode - 1. Two Sum

    Solution that i got , not a good one but at-least mine ๐Ÿ™ƒ , the Time Complexity is O(n^2) which is......

  • By rakeshreddy512 | November 12, 2023

    Leetcode - 70. Climbing Stairs

    Initial Solution /** * @param {number} n * @return {number} */ var climbStairs = function(n) { ......

  • By rakeshreddy512 | November 11, 2023

    Leetcode - 645. Set Mismatch

    Basically we need to return duplicated item and the missing item in array . since the numbers are......

  • By rakeshreddy512 | October 31, 2023

    Leetcode - 725. Split Linked List in Parts

    Lets get into the solution of the problem . Basically we need to split the linked list in k parts......

  • By rakeshreddy512 | October 30, 2023

    Leetcode - 845. Longest Mountain in Array

    Firstly i couldn't solve on my own ๐Ÿ˜… , so i went through this video U can visualize the mountains......

  • By rakeshreddy512 | October 30, 2023

    Leetcode - 796. Rotate String

    so basically we have a string s , and if its possible to rotate it and get to the string goal then we......