Programming Problems
Choose from 5 carefully curated programming challenges. Start with easy problems and work your way up to advanced algorithms.
Fibonacci Number
EasyThe Fibonacci numbers, commonly denoted `F(n)` form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. …
Palindrome Number
EasyGiven an integer `x`, return `true` if `x` is a palindrome, and `false` otherwise. An integer is a palindrome when it reads the same backward as forward. For example, `121` …
Two Sum
EasyGiven an array of integers `nums` and an integer `target`, return the indices of the two numbers such that they add up to `target`. You may assume that each input …
Valid Parentheses
EasyGiven a string `s` containing just the characters `'('`, `')'`, `'{'`, `'}'`, `'['` and `']'`, determine if the input string is valid. An input string is valid if: 1. Open …
Maximum Subarray
MediumGiven an integer array `nums`, find the subarray with the largest sum, and return its sum. A subarray is a contiguous non-empty sequence of elements within an array.