GGurpreetincodeanddebtfreejourney.hashnode.dev·Oct 24, 2025 · 3 min readSub-array with 0 sumGiven an array of integers A, find and return whether the given array contains a non-empty subarray with a sum equal to 0. If the given array contains a sub-array with sum zero return 1, else return 0. Problem Constraints 1 <= |A| <= 100000 -10^9 <= ...00
GGurpreetincodeanddebtfreejourney.hashnode.dev·Oct 24, 2025 · 3 min readLongest Substring Without Repeating CharactersGiven a string s, find the length of the longest substring without duplicate characters. example 1 Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Note that "bca" and "cab" are also correct answers. Brute Forc...00
GGurpreetincodeanddebtfreejourney.hashnode.dev·Oct 22, 2025 · 7 min readThe Magic Behind Instant Lookups: Understanding Hashing and Java's HashMap1. Hashing: The Core Concept Hashing is a technique used to convert a large key into a small integer value that serves as an index in an array. This array is called a Hash Table. The primary goal is to achieve near-O(1) (constant time) complexity for...00
GGurpreetincodeanddebtfreejourney.hashnode.dev·Oct 20, 2025 · 1 min readWhy I’m Starting My Debt-Free Journey (While Learning to Code)I’ve always believed growth happens when you face your truth — and here’s mine: I have debt, and I’m determined to clear it. As a single mom and computer science graduate, my days are a mix of cooking, teaching my daughter, managing bills, and now… l...00