This repository provides clean, well-structured Java solutions to the problems from the Striver DSA Sheet. Each solution is crafted for clarity, interview readiness, and ease of understanding—ideal for both beginners and those preparing for coding interviews.
Arrays/
├── 01_LargestElementInArray.java
├── 02_SecondLargestElement.java
├── 03_CheckIfArrayIsSortedAndRotated.java
├── 04_RemoveDuplicatesFromSortedArray.java
├── 05_LeftRotateArrayByOne.java
├── 06_LeftRotateArrayByDPlaces.java
├── 07_MoveZeroesToEnd.java
├── 08_LinearSearch.java
├── 09_FindUnionOfTwoSortedArrays.java
├── 10_FindMissingNumber.java
├── 11_MaxConsecutiveOnes.java
├── 12_SingleNumber_XOR.java
├── 13_LongestSubarraySumK_Positive.java
├── 14_LongestSubarraySumK_PositiveNegative.java
├── Extra_MaximumSubarraySum_Kadane.java
Each solution file includes:
- Problem Statement
- LeetCode/GFG Link
- Date
- Author: Aditya Kumar
- Approach Explanation
- Time & Space Complexity
- Complete Java Code
- Clone the repository:
git clone https://github.com/your-username/striver-dsa-java.git
- Open in your preferred Java IDE (IntelliJ IDEA, VS Code, Eclipse, etc.)
- Compile and run any solution:
javac Arrays/01_LargestElementInArray.java java Arrays.01_LargestElementInArray
- Java-only: All solutions are in Java for consistency.
- Beginner-friendly: Clear comments and descriptive class/method names.
- Professional structure: Easy navigation for recruiters and contributors.
- Consistent commits: Each update includes meaningful commit messages.
Aditya Kumar
Feel free to fork, contribute, or reach out for collaboration!