Array Interview Questions

  1. Find second smallest element in an array of integers (java / example)
  2. Find second largest element in an array of integers (java / example)
  3. Create or implement stack using array in java (with example)
  4. Implement two stacks using single array in java (example)
  5. Find missing number or element from duplicated array in java
  6. Given integer array, move zeros to end of array in java (example)
  7. Reverse an integer array in java using iterative & recursive algorithm
  8. Find maximum sum subarray in java using Kadane’s algorithm
  9. Prime number generator in java using Sieve of Eratosthenes algorithm
  10. Find union of two sorted integer or number arrays in java (example)
  11. Find intersection/common elements of two sorted integer arrays in java (example)
  12. Replace every element in integer array by greatest number on its right (java/ example)
  13. Find leader elements/numbers in integer array (java/example/iterative algorithm)
  14. Majority element in integer array (Boyer Moore’s voting algorithm) in java
  15. Find a missing number in an array of distinct integers in java (example)
  16. Find a number occurring odd number of times in integer array using java
  17. Dutch national flag problem or Sort array containing 0s, 1s & 2s in java
  18. Classify or segregate array containing even & odd numbers in java (example)
  19. Sort an integer array containing 0 & 1 in java (example)
  20. Check if array contains duplicate elements using java (example)
  21. Initialize & loop one, two, three dimensional array in java (example)
  22. Find maximum & minimum element in array (java / example)
  23. Find/search element in sorted integer array (java/binary search algorithm/iterative)
  24. Find element in an array using binary search algorithm in java (recursive)