Day 08 of my Java Daily Tasks focuses on Arrays Problem Solving.
In Day 07, I learned the basic operations of arrays. In Day 08, I am applying arrays to solve more logical and problem-solving-based programs.
This day includes duplicate elements, missing numbers, frequency counting, second largest and smallest elements, removing duplicates, merging arrays, sorting, moving zeros, and finding common elements.
The main objectives of Day 08 are:
Day-08-Arrays-Problem-Solving/
│
├── Questions/
│ └── Questions.txt
│
├── Screenshots/
│ ├── Output_1.png
│ ├── Output_2.png
│ ├── Output_3.png
│ ├── Output_4.png
│ ├── Output_5.png
│ ├── Output_6.png
│ ├── Output_7.png
│ ├── Output_8.png
│ ├── Output_9.png
│ └── Output_10.png
│
├── Solutions/
│ ├── Q01_Find_Duplicate.java
│ ├── Q02_Find_Missing_Number.java
│ ├── Q03_Count_Frequency.java
│ ├── Q04_Second_Largest.java
│ ├── Q05_Second_Smallest.java
│ ├── Q06_Remove_Duplicates.java
│ ├── Q07_Merge_Arrays.java
│ ├── Q08_Sort_Array.java
│ ├── Q09_Move_Zeros.java
│ └── Q10_Common_Elements.java
│
└── README.md
Find and print the duplicate elements present in an array.
Find the missing number from an array containing numbers from 1 to n.
Count how many times each element occurs in an array.
Find the second largest element in an array.
Find the second smallest element in an array.
Remove duplicate elements from an array and display only unique elements.
Merge two arrays into a single array.
Sort the elements of an array in ascending order.
Move all zero elements to the end of the array while maintaining the order of non-zero elements.
Find the elements that are common between two arrays.
| No. | Problem | Solution |
|---|---|---|
| Q01 | Find Duplicate | Q01_Find_Duplicate.java |
| Q02 | Find Missing Number | Q02_Find_Missing_Number.java |
| Q03 | Count Frequency | Q03_Count_Frequency.java |
| Q04 | Second Largest | Q04_Second_Largest.java |
| Q05 | Second Smallest | Q05_Second_Smallest.java |
| Q06 | Remove Duplicates | Q06_Remove_Duplicates.java |
| Q07 | Merge Arrays | Q07_Merge_Arrays.java |
| Q08 | Sort Array | Q08_Sort_Array.java |
| Q09 | Move Zeros | Q09_Move_Zeros.java |
| Q10 | Common Elements | Q10_Common_Elements.java |










cd Day-08-Arrays-Problem-Solving
cd Solutions
Example:
javac Q01_Find_Duplicate.java
java Q01_Find_Duplicate
The same process can be followed for the remaining programs.
Through Day 08, I practiced:
The goal of Day 08 is to build a strong foundation in array-based problem solving before moving toward more advanced Java topics such as:
| Day | Topic | Status |
|---|---|---|
| Day 08 | Arrays Problem Solving | ✅ Completed |
M. Praveen Kumar
⭐ This is part of my Java Daily Tasks journey to improve my Java programming and problem-solving skills.