Fine Grained List of Coding Questions

This is the fine-grained list of coding problems to jump start with the coding questions and get confidence in writing algorithms and learning data structures and algorithms.

As per experience, the right way to learn data structures and algorithms is through solving a coding problem. Start solving the coding problems and learn the data structure and algorithms coming your way. With this technique, you will learn and get hold on both, mastering the coding problems and learning the data structures and algorithms.

Besides, that you will learn the proper utilization of different types of data structures and algorithms and can understand them with their uses.

By the way, we learn the data structures and algorithms to use in application to solve a problem. Don’t we?


  • No copy-paste
  • You must understand and write logic first on paper, and then code.

Coding Questions

Here are the list of coding Questions to get you involved and get amazing confidence. It will start from easy to hard.

(Please allow me some time to update with the best and easy understanding solutions. Till then find solutions by searching the problems on google or YouTube).

  1. Find the sum of all elements of an integer array. Solution: Java
  2. Extract numbers from a String. Solution: Java
  3. Find if a given number is odd or even.
  4. Check if a number is a prime number
  5. Print all vowels from a string
  6. Reverse a given string etc. (1) In place., (2) using recursion
  7. Count frequency of every words in a string
  8. Print the following patterns: (1) Pyramid pattern, (2) Floyd’s, (3) Pascal Triangles.
  9. find factorial of a number using (1) loop, (2) recursion
  10. Print all prime number between a given range
  11. Write program to display Fibonacci series
  12. Write code for the following two programs based on a number: (1) Reverse the digits of a number, (2) find sum of the digits using (a) loop, (b) recursion.
  13. Find the missing number between 0-100 in an array.
  14. Find the smallest and highest elements of an integer array.
  15. Remove duplicates in an integer array.
  16. Check if a year is a leap year.
  17. Check if a word is palindrome etc.
  18. Check if a tree is a BST (Binary Search Tree)
  19. Find the value of the nth node from a linked list
  20. Find height of a tree.
  21. Write program for sum of two matrix
  22. Move all zeros to the end of an array maintaining the relative orders of the elements.
  23. Reverse the sentence without reversing each word. E.g. “Hello World” to World “Hello”
  24. Check if two strings are anagram to each other.
  25. Find the second largest element from an array. [ Constraints: Apply no sorting]
  26. Count duplicate words in a given string
  27. Find common elements from two integer array
  28. Check if a number is Armstrong number
  29. Compare two arrays if they are equal.
  30. Check balanced parenthesis using stack
  31. Stack design to retrieve minimum element in constant time.