Your first coding problems

New to coding problems? Start here: ten friendly problems, from fixing a small bug to your first hash map, each with hints and tests that run in your browser.

  1. Fix the Word Counter A word counter that counts the spaces between words, and counts one word in an empty string. Easy All 5 languages
  2. Fix the Bill Splitter Splitting money with rounding loses or invents cents. Easy All 5 languages
  3. Contains Duplicate Return true if any value appears at least twice. Easy All 5 languages
  4. Valid Palindrome Is the string a palindrome, ignoring case and non-alphanumerics? Easy All 5 languages
  5. Valid Anagram Check whether two strings are anagrams of each other. Easy All 5 languages
  6. Two Sum Find the indices of the two numbers that add up to a target. Easy Most asked All 5 languages
  7. Fix the Substring Check A contains-check that says no when the match is at the very start of the string. Easy Most asked All 5 languages
  8. Binary Search Find a target in a sorted array in O(log n). Easy All 5 languages
  9. Climbing Stairs Ways to climb n stairs taking 1 or 2 steps at a time. Easy Most asked All 5 languages
  10. Best Time to Buy and Sell Stock Max profit from one buy and one later sell. Easy Most asked All 5 languages

← All coding problems

Was this page helpful?