Top 100 Coding Problems

Top 100 Coding Problems

Learning programming becomes easy when you practice the right problems.
This page contains Top 100 Coding Problems that are commonly asked in coding interviews, exams, and online tests, suitable for all programming languages like C, C++, Java, Python, and more.

Whether you are a beginner or preparing for interviews, these problems will strengthen your logic, problem-solving skills, and coding confidence.

🟒 EASY CODING PROBLEMS (1–40)

  1. Print Hello World
  2. Print numbers from 1 to N
  3. Find sum of two numbers
  4. Check even or odd
  5. Find largest of two numbers
  6. Find largest of three numbers
  7. Swap two numbers
  8. Find factorial of a number
  9. Check prime number
  10. Print all prime numbers between two numbers
  11. Check palindrome number
  12. Reverse a number
  13. Find sum of digits
  14. Find product of digits
  15. Count number of digits
  16. Check Armstrong number
  17. Print Fibonacci series
  18. Find LCM of two numbers
  19. Find GCD / HCF
  20. Check leap year
  21. Print multiplication table
  22. Calculate simple interest
  23. Calculate compound interest
  24. Convert Celsius to Fahrenheit
  25. Convert days to years, months, days
  26. Find ASCII value of a character
  27. Check vowel or consonant
  28. Check alphabet, digit or special character
  29. Find power of a number
  30. Print numbers in reverse order
  31. Print sum of first N natural numbers
  32. Find square and cube of a number
  33. Print all even numbers between two numbers
  34. Print all odd numbers between two numbers
  35. Check positive, negative or zero
  36. Print pattern of stars (simple)
  37. Count vowels in a string
  38. Reverse a string
  39. Check string palindrome
  40. Find length of string (without built-in)

🟑 MEDIUM CODING PROBLEMS (41–75)

  1. Find second largest number in array
  2. Sort an array
  3. Remove duplicate elements from array
  4. Find frequency of elements in array
  5. Merge two arrays
  6. Rotate array elements
  7. Find missing number in array
  8. Find duplicate number in array
  9. Find largest and smallest element in array
  10. Reverse an array
  11. Check anagram strings
  12. Count words in a sentence
  13. Find first non-repeating character
  14. Replace characters in string
  15. Convert string to uppercase/lowercase
  16. Find factorial using recursion
  17. Fibonacci using recursion
  18. Binary to decimal conversion
  19. Decimal to binary conversion
  20. Check perfect number
  21. Find sum of array elements
  22. Find average of array elements
  23. Implement linear search
  24. Implement binary search
  25. Find common elements in two arrays
  26. Count frequency of characters in string
  27. Find longest word in a sentence
  28. Check balanced parentheses
  29. Print pyramid pattern
  30. Print number patterns
  31. Find maximum occurring character
  32. Count even and odd elements in array
  33. Remove spaces from string
  34. Find substring in string
  35. Implement simple calculator

πŸ”΄ HARD CODING PROBLEMS (76–100)

  1. Implement stack using array
  2. Implement queue using array
  3. Reverse stack using recursion
  4. Implement linked list
  5. Reverse linked list
  6. Detect loop in linked list
  7. Implement binary search tree
  8. Inorder, Preorder, Postorder traversal
  9. Find height of binary tree
  10. Implement bubble sort
  11. Implement selection sort
  12. Implement insertion sort
  13. Implement merge sort
  14. Implement quick sort
  15. Find shortest path (basic logic)
  16. Check string rotation
  17. Longest common substring
  18. Longest common subsequence
  19. Find majority element
  20. Find pair with given sum
  21. Kadane’s Algorithm (maximum subarray sum)
  22. Implement hash map logic
  23. Find all permutations of string
  24. Solve Tower of Hanoi
  25. Sudoku solver (basic approach)

πŸ“Œ How to Use This Page

  • Solve problems in any language you prefer

  • Start from easy β†’ medium β†’ hard

  • Focus on logic first, syntax later

  • Practice daily for best results

🎯 Why These Problems Matter

  • Asked in technical interviews

  • Improve logic & DSA concepts

  • Work with any programming language

  • Help build real coding confidence

0

Subtotal