Welcome to My Technical Blog

Exploring algorithms, data structures, and software engineering insights through detailed LeetCode problem solutions

313+ Problems Solved
3 Difficulty Levels
20+ Categories

Latest Posts

[Medium] 221. Maximal Square

Given an m x n binary matrix filled with '0's and '1's, find the largest square containing only '1's and...
leetcodemediumdynamic-programming

All Posts

[Medium] 324. Wiggle Sort II

Rearrange nums such that nums[0] < nums[1] > nums[2] < nums[3] ... (wiggle order).
leetcodealgorithmmediumjavaarraysnth-elementthree-way-partitionindex-mappingproblem-solving

[Easy] 20. Valid Parentheses

Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
leetcodealgorithmeasyjavastringstackproblem-solving

[Medium] 525. Contiguous Array

Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1.
leetcodealgorithmmediumjavaarrayshash-mapprefix-sumproblem-solving

[Hard] 480. Sliding Window Median

The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean...
leetcodealgorithmhardjavaarraysmultisetsliding-windowtwo-heapsproblem-solving

[Hard] 239. Sliding Window Maximum

You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right....
leetcodealgorithmhardjavaarraysdequesliding-windowmonotonic-queueproblem-solving

[Easy] 485. Max Consecutive Ones

Given a binary array nums, return the maximum number of consecutive 1’s in the array.
leetcodealgorithmeasyjavaarrayssliding-windowproblem-solving

[Medium] 18. 4Sum

Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that:
leetcodealgorithmmediumjavaarraystwo-pointerssortingproblem-solving

Algorithm Templates: Trees

Trees are one of the most frequently tested data structures in coding interviews. This page collects ready-to-use Java templates for every major tree pattern — from basic traversals to advanced...
leetcodetemplatestrees

Algorithm Templates: Math & Geometry

Minimal, copy-paste Java for combinatorics (nCk mod P) and 2D geometry primitives (cross product, point on segment).
leetcodetemplatesmathgeometry

Subscribe via RSS to stay updated