Nov 5, 2025
Rearrange nums such that nums[0] < nums[1] > nums[2] < nums[3] ... (wiggle order).
leetcodealgorithmmediumjavaarraysnth-elementthree-way-partitionindex-mappingproblem-solving
Nov 5, 2025
A parentheses string is valid if and only if:
leetcodealgorithmmediumjavastringstackgreedyproblem-solving
Nov 5, 2025
Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
leetcodealgorithmeasyjavastringstackproblem-solving
Nov 5, 2025
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
Nov 5, 2025
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
Nov 5, 2025
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
Nov 5, 2025
Given a binary array nums, return the maximum number of consecutive 1’s in the array.
leetcodealgorithmeasyjavaarrayssliding-windowproblem-solving
Nov 5, 2025
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
Oct 29, 2025
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
Oct 29, 2025
Minimal, copy-paste Java for combinatorics (nCk mod P) and 2D geometry primitives (cross product, point on segment).
leetcodetemplatesmathgeometry