Skip to content

May 2025

Missing Number - 268

Missing Number – 268

🔗LC136 🟢 Easy 🧩 Pattern – XOR Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array. Example Solution Bitwise XOR operator ^ is the only way to solve this question, personally, I don’t… Read More »Missing Number – 268

Single Number - 136

Single Number – 136

🔗LC136 🟢 Easy 🧩 Pattern – XOR, Hashmap Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linear runtime complexity and use only constant extra space. Example Solution Bitwise XOR operator ^ is the only way to solve… Read More »Single Number – 136

Sum of Numbers in a String - JS

Sum of Numbers in a String – JS

🟢 Easy 🧩 Pattern – Strings, Regex and Loops From the given string of Characters (can be a mix of numbers, alphabets, and other special characters), we need to find the sum of all numbers in the string. Examples JS Solution