This repository contains Java implementations of frequently asked Data Structures and Algorithms (DSA) problems in technical interviews. Each solution prioritizes clarity, performance, and readability. Where relevant, both brute-force and optimized approaches are included, along with time and space complexity analysis.
| Difficulty | Problem |
|---|---|
| Easy | Two Sum |
| Easy | Best Time to Buy and Sell Stock |
| Medium | Product of Array Except Self |
| Easy | Maximum Subarray |
| Easy | Maximum Average Subarray I |
| Medium | Longest Substring Without Repeating Characters |
| Easy | Valid Palindrome |
| Medium | Two Sum II |
| Medium | Container With Most Water |
| Easy | Move Zeroes |
| Easy | Find Pivot Index |
| Easy | Majority Element |
| Medium | Three Sum |
| Medium | Minimum Size Subarray Sum |
| Difficulty | Problem |
|---|---|
| Medium | Grumpy Book Store Owner |
| Implementation | Description |
|---|---|
| Binary Search Tree (BST) | A complete implementation of a BST with operations like insertion, in-order traversal, height, size, number of leaf nodes, min/max value lookup, and search. Located under src/tree/BinarySearchTree.java |
| AVL Tree | Implemented AVL Tree with basic insert functionality. Located under src/tree/AVLTree.java |
- Each topic is organized under its respective package inside the
src/directory. - Solutions are written in Java and can be executed individually using the
mainmethod in each file. - Use this repo as:
- A reference for interview prep
- A launchpad to build more advanced DSA skills
- A project portfolio entry to showcase on your GitHub
To prepare for top-tier software engineering interviews (targeting 24+ LPA roles) by mastering core DSA concepts using Java. This repository is part of a structured roadmap focused on building strong fundamentals.
- ๐ Stack & Queue
- ๐ Binary Search
- ๐ฒ AVL Tree, Tree Traversals
- ๐งฎ Recursion & Backtracking
- ๐ Linked Lists
- ๐ง Dynamic Programming
- ๐งฉ Graphs & Greedy Algorithms
- ๐ฌ Mock Interviews
This is a personal interview-prep repository, but you're welcome to fork it, use it for your own prep, and contribute improvements.