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)
- Print Hello World
- Print numbers from 1 to N
- Find sum of two numbers
- Check even or odd
- Find largest of two numbers
- Find largest of three numbers
- Swap two numbers
- Find factorial of a number
- Check prime number
- Print all prime numbers between two numbers
- Check palindrome number
- Reverse a number
- Find sum of digits
- Find product of digits
- Count number of digits
- Check Armstrong number
- Print Fibonacci series
- Find LCM of two numbers
- Find GCD / HCF
- Check leap year
- Print multiplication table
- Calculate simple interest
- Calculate compound interest
- Convert Celsius to Fahrenheit
- Convert days to years, months, days
- Find ASCII value of a character
- Check vowel or consonant
- Check alphabet, digit or special character
- Find power of a number
- Print numbers in reverse order
- Print sum of first N natural numbers
- Find square and cube of a number
- Print all even numbers between two numbers
- Print all odd numbers between two numbers
- Check positive, negative or zero
- Print pattern of stars (simple)
- Count vowels in a string
- Reverse a string
- Check string palindrome
- Find length of string (without built-in)
π‘ MEDIUM CODING PROBLEMS (41β75)
- Find second largest number in array
- Sort an array
- Remove duplicate elements from array
- Find frequency of elements in array
- Merge two arrays
- Rotate array elements
- Find missing number in array
- Find duplicate number in array
- Find largest and smallest element in array
- Reverse an array
- Check anagram strings
- Count words in a sentence
- Find first non-repeating character
- Replace characters in string
- Convert string to uppercase/lowercase
- Find factorial using recursion
- Fibonacci using recursion
- Binary to decimal conversion
- Decimal to binary conversion
- Check perfect number
- Find sum of array elements
- Find average of array elements
- Implement linear search
- Implement binary search
- Find common elements in two arrays
- Count frequency of characters in string
- Find longest word in a sentence
- Check balanced parentheses
- Print pyramid pattern
- Print number patterns
- Find maximum occurring character
- Count even and odd elements in array
- Remove spaces from string
- Find substring in string
- Implement simple calculator
π΄ HARD CODING PROBLEMS (76β100)
- Implement stack using array
- Implement queue using array
- Reverse stack using recursion
- Implement linked list
- Reverse linked list
- Detect loop in linked list
- Implement binary search tree
- Inorder, Preorder, Postorder traversal
- Find height of binary tree
- Implement bubble sort
- Implement selection sort
- Implement insertion sort
- Implement merge sort
- Implement quick sort
- Find shortest path (basic logic)
- Check string rotation
- Longest common substring
- Longest common subsequence
- Find majority element
- Find pair with given sum
- Kadaneβs Algorithm (maximum subarray sum)
- Implement hash map logic
- Find all permutations of string
- Solve Tower of Hanoi
- 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