Three Sum (Blind 75) — O(n²) Solution

Problem Overview We are given an integer array nums, We need to find all unique triplets [nums[i], nums[j], nums[k]] such that: i != j, i != k, j != k nums[i] + nums[j] + nums[k] == 0 We need to return unique triplets Notice that the order of the output and the order of the triplets does not matter. LeetCode - Three Sum Example Input: [-1, 0, 1, 2, -1, -4] Output: [[-1,-1,2], [-1,0,1]] Explanation: ...

February 15, 2026 · 4 min · 648 words · Hitesh Patel

Search in Rotated Sorted Array (Blind 75) — O(log n) Solution

Problem Overview We are given a sorted array nums of distinct integers The array has been possibly rotated at some pivot k (unknown). Example: Original: [0,1,2,4,5,6,7] Rotated : [4,5,6,7,0,1,2] We must return the index of target if it exists in the array else return -1. The required time complexity is O(log n). LeetCode - Search in Rotated Sorted Array Brute Force Approach The simplest approach is to scan the entire array. ...

February 13, 2026 · 3 min · 437 words · Hitesh Patel

Blind 75: Find Minimum in Rotated Sorted Array — Understanding Binary Search Deeper

Problem Overview We are given an array nums The array was originally sorted in ascending order and then left-rotated by k positions, where 1 < k < n All elements in the array are unique We need to find the minimum element in the array The goal is to design a solution with O(log n) time complexity How I Approached the Problem I follow a strict rule when solving problems like this: ...

February 11, 2026 · 2 min · 342 words · Hitesh Patel