Skip to content

YUVRAJRANA10/DS-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 PCT Coding Test Environment - December 2025

🎯 Overview

This folder contains 81 DSA coding questions from the December 2025 PCT Exams, organized as a complete coding test environment.

📁 Structure

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)

🚀 How to Use

Step 1: Choose a Question

Open any file (e.g., File1_Q1_FamilyPhotograph.java)

Step 2: Read the Problem

Each file contains:

  • ✅ Problem statement
  • ✅ Classification (Array, Stack, etc.)
  • ✅ Test cases with expected outputs
  • ✅ Algorithm hint
  • ✅ Similar questions for more practice

Step 3: Implement Your Solution

Find the // YOUR CODE HERE sections and write your solution.

Step 4: Run and Test

cd CodingTest
javac File1_Q1_FamilyPhotograph.java
java File1_Q1_FamilyPhotograph

Step 5: Check Results

The program automatically validates with:

  • ✓ PASSED - Your solution is correct
  • ✗ FAILED - Review your implementation

📋 Complete Question List

File 1 (Array, Hashing, Stack, String, Matrix)

# 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

File 2 (Binary Search, Greedy, Two-Pointer)

# 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

File 3 (Sorting, Search, Stack, BST)

# 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

File 4 (Queue, Matrix, Hashing, Stack)

# 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

File 5 (Linked List, Matrix, DP, Heap)

# 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

File 6 (String, Sorting, Array, Stack)

# 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

File 7 (Array, Stack, Tree, Linked List)

# 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

File 8 (String, Queue, Matrix, Heap, Backtracking)

# 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

File 9 (Sorting, DP, Hashing, Two-Pointer)

# 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

🎓 Topics Covered

  • 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

💡 Tips

  1. Start with easier topics (Array, String) before complex ones (DP, Backtracking)
  2. Read the algorithm hint if stuck
  3. Try similar questions for more practice
  4. Time yourself to simulate exam conditions

Good luck! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages