Coding Problems

Practice algorithmic problems and improve your coding skills

Guest Access: You can view 1 problem. Register to solve problems and track your progress.

Generate an n×n matrix filled with numbers from 1 to n² in spiral order (clockwise from outside to inside).

matrix simulation spiral
200 points Solve Problem

Given a list of time intervals, merge all overlapping intervals and return the merged intervals sorted by start time.

intervals sorting merging

Given a binary tree and a target sum, determine if there exists a root-to-leaf path where the sum of node values equals...

binary-tree dfs path-sum

Count the frequency of each word in a given text and return the top k most frequent words in descending order of frequen...

string frequency sorting

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

string stack

Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and...

array dynamic-programming

The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is th...

math dynamic-programming recursion

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target...

array hash-table

Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the si...

math

Given an integer x, return true if x is palindrome integer. An integer is a palindrome when it reads the same backward a...

math
Showing 91 to 100 of 100 results
Feedback