This folder contains 81 DSA coding questions from the December 2025 PCT Exams, organized as a complete coding test environment.
All questions are organized by file number (1-9) with 9 questions each:
CodingTest/
├── File1_Q1 to Q9 (Array, Hashing, Stack, String, Matrix)
├── File2_Q1 to Q9 (Binary Search, Greedy, Two-Pointer, Linked List)
├── File3_Q1 to Q9 (Sorting, Search, Stack, String, BST)
├── File4_Q1 to Q9 (Queue, Matrix, Hashing, Stack)
├── File5_Q1 to Q9 (Linked List, Matrix, DP, Heap, Sliding Window)
├── File6_Q1 to Q9 (String, Sorting, Array, Stack)
├── File7_Q1 to Q9 (Array, Stack, Tree, Linked List)
├── File8_Q1 to Q9 (String, Queue, Matrix, Heap, Backtracking)
└── File9_Q1 to Q9 (Sorting, DP, Hashing, Two-Pointer, Linked List)
Open any file (e.g., File1_Q1_FamilyPhotograph.java)
Each file contains:
- ✅ Problem statement
- ✅ Classification (Array, Stack, etc.)
- ✅ Test cases with expected outputs
- ✅ Algorithm hint
- ✅ Similar questions for more practice
Find the // YOUR CODE HERE sections and write your solution.
cd CodingTest
javac File1_Q1_FamilyPhotograph.java
java File1_Q1_FamilyPhotographThe program automatically validates with:
- ✓ PASSED - Your solution is correct
- ✗ FAILED - Review your implementation
| # | Question | Topic |
|---|---|---|
| 1 | Family Photograph (Reverse in K-blocks) | Array |
| 2 | Airline Baggage Tracking (Unique IDs) | Hashing |
| 3 | Cleaning String (Remove Leading Zeros) | String |
| 4 | Tray Stack (Receive/Serve) | Stack |
| 5 | Prefix Calculator | Stack |
| 6 | Seat Reservation (2D Array) | Matrix |
| 7 | First Unique Character | Hashing |
| 8 | Reverse Words in String | String |
| 9 | Matrix Diagonals Sum | Matrix |
| # | Question | Topic |
|---|---|---|
| 1 | Last Occurrence (Binary Search) | Binary Search |
| 2 | Maximize Sum (First + Last) | Greedy |
| 3 | Find Rotation Count | Binary Search |
| 4 | Total Search Time | Array |
| 5 | Audit Function (Find Mode) | Hashing |
| 6 | Move Zeroes | Two-Pointer |
| 7 | Merge Sorted Arrays | Two-Pointer |
| 8 | Find Peak Element | Binary Search |
| 9 | Reverse Linked List | Linked List |
| # | Question | Topic |
|---|---|---|
| 1 | Insertion Sort Energy (Shifts × 4) | Sorting |
| 2 | Decreasing Search (Binary Search Desc) | Binary Search |
| 3 | Employee Search (ID/Name) | Search |
| 4 | Braces Balance (Bracket Matching) | Stack |
| 5 | String Compression (RLE) | String |
| 6 | Word Frequency | Hashing |
| 7 | Warehouse Inventory (Linked List) | Linked List |
| 8 | Odd-Even Linked List | Linked List |
| 9 | BST Operations | Tree |
| # | Question | Topic |
|---|---|---|
| 1 | Reverse Queue | Queue |
| 2 | Recursive Queue Reverse | Queue |
| 3 | Code Compiler Brackets | Stack |
| 4 | Search Matrix (Staircase) | Matrix |
| 5 | Unique Elements | Hashing |
| 6 | Heat Wave (Max Temp, Trends) | Array |
| 7 | Run-Length Encoding | String |
| 8 | Missing Number (1..N) | Math |
| 9 | Baseball Game | Stack |
| # | Question | Topic |
|---|---|---|
| 1 | N-th Node from End | Linked List |
| 2 | Remove Duplicates (Sorted) | Linked List |
| 3 | Matrix Multiplication | Matrix |
| 4 | Max Profit (Stock) | DP/Greedy |
| 5 | K-th Smallest Element | Heap |
| 6 | Smallest Window Substring | Sliding Window |
| 7 | Counting Characters | Hashing |
| 8 | Fair Distribution (Candy) | Greedy |
| 9 | Caesar Cipher | String |
| # | Question | Topic |
|---|---|---|
| 1 | Palindrome Check | Two-Pointer |
| 2 | Reverse Queue using Stack | Stack/Queue |
| 3 | Placement Drive (Sort by CGPA) | Sorting |
| 4 | Second Highest | Array |
| 5 | Examination Marks (+4/-1) | Array |
| 6 | Height Report (Statistics) | Array |
| 7 | Matrix Row Sum | Matrix |
| 8 | Valid Parentheses | Stack |
| 9 | Baseball Game V2 | Stack |
| # | Question | Topic |
|---|---|---|
| 1 | Even/Odd Count | Array |
| 2 | Negative Profit Days | Array |
| 3 | Sum of Digits | Math |
| 4 | Partial Stack Reversal | Stack |
| 5 | Ticket Time | Queue |
| 6 | Peak Element V2 | Binary Search |
| 7 | Binary Tree Traversal | Tree |
| 8 | Split Circular Linked List | Linked List |
| 9 | Merge Sorted Lists | Linked List |
| # | Question | Topic |
|---|---|---|
| 1 | Capitalize Words | String |
| 2 | Validate Alphanumeric | String |
| 3 | Action Logs Stack (SLL) | Stack |
| 4 | Flight Gate Queue | Queue |
| 5 | Spiral Matrix | Matrix |
| 6 | K-th Largest in Stream | Heap |
| 7 | Column Sum | Matrix |
| 8 | Rat in a Maze | Backtracking |
| 9 | Game Simulation | Simulation |
| # | Question | Topic |
|---|---|---|
| 1 | Insertion Sort Energy V2 | Sorting |
| 2 | Bubble Sort Swaps | Sorting |
| 3 | Server Log Analysis | Hashing |
| 4 | Non-Adjacent Max Sum | DP |
| 5 | Longest Subarray Sum K | Hashing |
| 6 | Sort Binary Array | Two-Pointer |
| 7 | Move Zeroes V2 | Two-Pointer |
| 8 | Sorted Union | Linked List |
| 9 | Sorted Intersection | Linked List |
- Array: Manipulation, Search, Statistics
- String: Parsing, Encoding, Validation
- Linked List: Reversal, Merge, Split
- Stack: Expression Evaluation, Bracket Matching
- Queue: Simulation, Reversal
- Tree: Traversals, BST Operations
- Matrix: Search, Spiral, Multiplication
- Binary Search: Variants
- Two-Pointer: Sorting, Partitioning
- Hashing: Frequency, Unique Elements
- DP: Max Sum, Optimization
- Backtracking: Pathfinding
- Heap: K-th Element, Streaming
- Start with easier topics (Array, String) before complex ones (DP, Backtracking)
- Read the algorithm hint if stuck
- Try similar questions for more practice
- Time yourself to simulate exam conditions
Good luck! 🚀