Skip to content

KoushalShrma/DSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Curated DSA Interview Questions - Java Edition

The Ultimate Collection of Data Structures & Algorithms Problems for Interview Preparation

This repository contains a carefully curated collection of the most important and logic-building DSA problems specifically focusing on Arrays, Strings, and Linked Lists in Java. These problems are selected from top-tier repositories and are designed to prepare you for technical interviews at companies like Reqpedia and other top-tier organizations.

🎯 Repository Focus

This collection emphasizes:

  • Quality over Quantity: Only the most important and frequently asked problems
  • Pattern Mastery: Comprehensive coverage of essential algorithmic patterns
  • Logic Building: Problems that enhance problem-solving and analytical thinking
  • Interview Readiness: Real-world problems asked in technical interviews
  • Java Implementation: All solutions and examples are in Java

📚 Problem Categories

🔢 Arrays

Essential patterns covered:

  • Two Pointers, Sliding Window, Prefix/Suffix Sums
  • Searching, Sorting, Binary Search variations
  • Kadane's Algorithm, Subarray problems
  • Array rotations, rearrangements, merging
  • Frequency counting, majority elements

🔤 Strings

Essential patterns covered:

  • Palindrome detection and manipulation
  • Substring search and pattern matching (KMP, Rabin-Karp)
  • Sliding window techniques
  • Character counting and anagram detection
  • String parsing and validation
  • Edit distance and dynamic programming

🔗 Linked Lists

Essential patterns covered:

  • Floyd's Cycle Detection Algorithm
  • Linked List reversal and manipulation
  • Two pointer techniques
  • Merging and sorting operations
  • Deep copying and complex operations
  • Intersection and palindrome detection

📋 Curated Problem Set

# Title Difficulty Pattern Source Link Notes Solve Here
1 Two Sum Medium Hash Table + Array GitHub Foundation problem for hash table usage LeetCode
2 3Sum Medium Two Pointers + Arrays GitHub Classic two-pointer technique, avoid duplicates LeetCode
3 Trapping Rain Water Hard Two Pointers + Arrays GitHub Advanced two-pointer, multiple approaches LeetCode
4 Maximum Subarray Medium Kadane's Algorithm GitHub Essential DP pattern for subarray problems LeetCode
5 Container With Most Water Medium Two Pointers + Arrays GitHub Greedy two-pointer approach LeetCode
6 Merge Intervals Medium Interval Merging GitHub Critical for interval-based problems LeetCode
7 Rotate Array Medium Array Rotation GitHub Multiple rotation techniques LeetCode
8 Search in Rotated Sorted Array Medium Binary Search + Arrays GitHub Advanced binary search variation LeetCode
9 First Missing Positive Hard Array Manipulation GitHub In-place array modification technique LeetCode
10 Next Permutation Medium Array Rearrangement GitHub Complex array manipulation logic LeetCode
11 Longest Palindromic Substring Medium String + Palindrome GitHub Expand around center technique LeetCode
12 Longest Substring Without Repeating Characters Medium Sliding Window + String GitHub Classic sliding window pattern LeetCode
13 Minimum Window Substring Hard Sliding Window + String GitHub Advanced sliding window technique LeetCode
14 Group Anagrams Medium Hash Table + String GitHub String sorting and grouping LeetCode
15 Valid Palindrome Easy Two Pointers + String GitHub String normalization and validation LeetCode
16 Implement strStr() Medium KMP Algorithm + String GitHub Pattern matching algorithms LeetCode
17 Longest Common Prefix Easy String Manipulation GitHub String comparison techniques LeetCode
18 String to Integer (atoi) Medium String Parsing GitHub Complex string parsing and validation LeetCode
19 Palindrome Partitioning Medium Backtracking + String GitHub Backtracking with palindrome validation LeetCode
20 Edit Distance Hard Dynamic Programming + String GitHub Classic DP for string transformation LeetCode
21 Linked List Cycle Easy Floyd's Algorithm + LinkedList GitHub Essential cycle detection technique LeetCode
22 Linked List Cycle II Medium Floyd's Algorithm + LinkedList GitHub Advanced cycle detection with position LeetCode
23 Reverse Linked List II Medium LinkedList Reversal GitHub Partial linked list reversal LeetCode
24 Merge Two Sorted Lists Easy LinkedList Merging GitHub Foundation for merge operations LeetCode
25 Remove Nth Node From End of List Medium Two Pointers + LinkedList GitHub One-pass two-pointer technique LeetCode
26 Intersection of Two Linked Lists Easy Two Pointers + LinkedList GitHub Elegant intersection detection LeetCode
27 Add Two Numbers Medium LinkedList Arithmetic GitHub Digit-by-digit addition with carry LeetCode
28 Copy List with Random Pointer Medium Deep Copy + LinkedList GitHub Complex linked list deep copying LeetCode
29 Merge k Sorted Lists Hard Divide & Conquer + LinkedList GitHub Advanced merging with heap/divide-conquer LeetCode
30 Sort List Medium Merge Sort + LinkedList GitHub Implementing merge sort on linked list LeetCode

🏆 Why This Collection?

Comprehensive Pattern Coverage

Every essential algorithmic pattern is covered through carefully selected problems that build upon each other.

Interview-Tested Problems

All problems are frequently asked in technical interviews at top companies including Google, Amazon, Microsoft, and startups like Reqpedia.

Progressive Difficulty

Problems are arranged to build your understanding from fundamental concepts to advanced techniques.

Logic Building Focus

Each problem is chosen for its ability to enhance logical thinking and problem-solving skills.

High-Quality Sources

All problems are sourced from the most reputable and well-maintained repositories:

  • doocs/leetcode: 34,429+ stars, exceptional quality and organization
  • Blankj/awesome-java-leetcode: 8,714+ stars, Java-focused solutions
  • LeetCode Official: Primary problem source with comprehensive test cases

🚀 How to Use This Repository

  1. Start with the Pattern: Understand the underlying pattern for each problem category
  2. Read the Problem Statement: Click on "Solve Here" links to read full problem descriptions
  3. Study the Source Code: Visit GitHub links to see multiple solution approaches
  4. Practice Implementation: Implement solutions in your preferred IDE
  5. Analyze Complexity: Understand time and space complexity for each approach
  6. Master Variations: Practice similar problems to reinforce patterns

📈 Learning Path

Beginner Path (Problems 1, 15, 17, 21, 24, 26)

Start with these foundational problems to build core understanding.

Intermediate Path (Problems 2-14, 18-19, 22-23, 25, 27-28)

Tackle these problems after mastering the basics.

Advanced Path (Problems 3, 9, 13, 20, 29-30)

Challenge yourself with these complex problems requiring deep algorithmic knowledge.

🎯 Interview Success Tips

  1. Pattern Recognition: Focus on recognizing which pattern applies to new problems
  2. Time Management: Practice solving problems within interview time constraints
  3. Code Quality: Write clean, readable code with proper variable names
  4. Edge Cases: Always consider and handle edge cases
  5. Optimization: Start with brute force, then optimize step by step
  6. Communication: Practice explaining your thought process clearly

🤝 Contributing

This is a curated collection focused on quality over quantity. While we welcome suggestions for critical problems that may be missing, please ensure any proposed additions:

  • Are frequently asked in interviews
  • Represent unique algorithmic patterns
  • Provide significant learning value
  • Have high-quality solutions available

📚 Additional Resources


Happy Coding! 🚀 Master these 30 problems and you'll be well-prepared for any Array, String, or LinkedList question in your technical interviews.

About

Curated list of 50 medium to high-level DSA questions gathered via AI from top GitHub repos, tailored for interviews (2025–26). Covers all major patterns and trending topics. Solve these to confidently crack any DSA round. Your ultimate prep starts here!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages