A well-structured collection of Data Structures and Algorithms (DSA) problems implemented in Java.
This repository contains commonly asked coding interview problems organized by algorithmic patterns and problem-solving techniques. The goal of this repository is to practice DSA systematically and build strong problem-solving skills for technical interviews.
Problems based on array traversal, subarrays, and optimization techniques.
Topics covered:
- Two Sum
- Best Time to Buy and Sell Stock
- Print All Pairs in Array
- Print All Subarrays
- Maximum Subarray Sum (Brute Force)
- Maximum Subarray Sum (Prefix Sum)
- Kadane’s Algorithm
📁 Folder: Arrays
Problems based on searching algorithms.
Basic searching technique where elements are checked sequentially.
Topics covered:
- Basic Linear Search
- Find Largest Element in Array
📁 Folder: Linear-Search
Efficient searching technique used on sorted arrays.
Topics covered:
- Basic Binary Search
- First Occurrence in Sorted Array
- Last Occurrence in Sorted Array
- Count Occurrences in Sorted Array
- Search in Rotated Sorted Array
📁 Folder: Binary-Search
Problems solved using the Two Pointer technique, commonly used for arrays and strings.
Topics covered:
- Reverse Array using Two Pointers
📁 Folder: Two-Pointers
Optimized technique used for subarray and substring problems.
Examples include:
- Maximum Sum Subarray of Size K
- Longest Substring Without Repeating Characters
📁 Folder: Sliding-Window
Implementation of common sorting algorithms.
Algorithms included:
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
📁 Folder: Sorting
- Arrays
- Searching Algorithms
- Sorting Algorithms
- Two Pointer Technique
- Sliding Window Technique
- Time Complexity Optimization
- Clone the repository
git clone https://github.com/Suhas-Bharti/DSA-in-Java.git- Navigate to the project directory
cd DSA-in-Java- Compile any Java file
javac FileName.java- Run the program
java FileName- Strengthen problem-solving skills
- Practice common coding interview questions
- Understand algorithmic patterns
- Build a structured DSA learning path
Suhas Bharti
⭐ If you find this repository helpful, consider giving it a star.