Spiral Matrix Generator
MediumGenerate an n×n matrix filled with numbers from 1 to n² in spiral order (clockwise from outside to inside).
Time Interval Merger
HardGiven a list of time intervals, merge all overlapping intervals and return the merged intervals sorted by start time.
Binary Tree Path Sum
HardGiven a binary tree and a target sum, determine if there exists a root-to-leaf path where the sum of node values equals...
Count the frequency of each word in a given text and return the top k most frequent words in descending order of frequen...
Valid Parentheses
EasyGiven a string s containing just the characters "(", ")", "{", "}", "[" and "]", determine if the input string is valid....
Maximum Subarray
MediumGiven an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and...
Fibonacci Number
EasyThe Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is th...
Two Sum
EasyGiven an array of integers nums and an integer target, return indices of the two numbers such that they add up to target...
Reverse Integer
MediumGiven a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the si...
Palindrome Number
EasyGiven an integer x, return true if x is palindrome integer. An integer is a palindrome when it reads the same backward a...