30 Basic DSA Warm-up Problems (Before
LeetCode)
PART 1: Logic & Loops
1. Print numbers from 1 to N
2. Find sum of first N numbers
3. Check if a number is prime
4. Count digits in a number
5. Reverse a number
6. Check palindrome number
7. Find factorial of a number
8. Print all factors of a number
9. Find GCD of two numbers
10. Check Armstrong number
PART 2: Arrays
11. Find largest element in array
12. Find second largest element
13. Reverse an array
14. Check if array is sorted
15. Count frequency of each element
16. Remove duplicates from array
17. Move all zeros to the end
18. Find missing number in range 1 to N
19. Rotate array by K positions
20. Find intersection of two arrays
PART 3: Strings
21. Reverse a string
22. Check if string is palindrome
23. Count vowels and consonants
24. Check if two strings are anagrams
25. Find first non-repeating character
PART 4: Recursion
26. Print numbers using recursion
27. Find factorial using recursion
28. Fibonacci using recursion
29. Check palindrome using recursion
30. Sum of array using recursion