Skip to content

tianlongc/WIA1002_UM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIA1002_UM

This repository contains my solutions for the course WIA1002 Data Structure(DS) in Universiti of Malaya in Year 1 Sem 2. The programming language mainly used in this course used is Java

Java License Last Commit

🗺️ Navigation

Tutorial Lab PYQ

🗂️ Course Outline

Topic Tutorial Lab
Object-Oriented Programming (OOP) Tutorial 01 Lab 01
Generics Tutorial 02 Lab 02
ADT and Bag Tutorial 03 Lab 03
Singly Linked List Tutorial 04 Lab 04
Doubly Linked List Tutorial 05 Lab 05
Stack Tutorial 06 Lab 06
Queue Tutorial 07 Lab 07
Priority Queue Tutorial 07b Lab 07b
Graph Tutorial 08 Lab 08
Recursion Tutorial 09 Lab 09
Search and Sort Tutorial 10 Lab 10
Binary Search Tree (BST) Tutorial 11 Lab 11

📝 Past Year Question

HashMap-related questions can be ignored, as they are no longer part of the syllabus — but feel free to try them for your own learning and practice.


📄 Format 1: From-Scratch Implementation of Data Structures (2016 sem 2 - 2020 sem 1)

Common Instruction:
No marks will be given for any implementation using the existing Data Structure class or any other Collection classes available from the Java API Library.

These problems emphasize manual (from-scratch) implementation of core data structures — without relying on Java's built-in Collection classes e.g. java.util.Stack, java.util.Queue.

In other words, you are expected to build your own versions of these data structures (creating a custom Stack class using arrays or linked lists).

These past year questions are great for strengthening your foundational understanding of

  • Stacks using basic array implementation or linked list
  • Queues using circular array implementation or circular linked list

💡 Suggestion:
I recommend starting with array-based implementations since most questions require your custom classes to handle a fixed size limitation. Linked lists are more dynamic, flexible and easier to work with once you have mastered the fundamentals.


⭐ Recommended Questions to Try

These past-year questions are great practice for mastering Stack and Queue topics in Java:

Semester Question Concepts used Link
2016 sem 2 Bracket Matching Array Stack
File Handling (Read File)
WIA1002_2_2016 Q2
2017 sem 1 Reversing a String Array Stack WIA1002_1_2017 Q3
2019 sem 2 Maze Backtracking
Hard
Linked List Stack
File Handling (Read File)
WIA1002_2_2019 Q3
2020 sem 1 Generic Stack Array Stack WIA1002_1_2020 Q1
2020 sem 1 Generic Queue Circular Array WIA1002_1_2020 Q2
2020 sem 1 Generic Queue Circular Linked List WIA1002_1_2020 Q2

📁 List of Question Sets

Semester Link
2016 Sem 2 📂 WIA1002_2_2016
2017 Sem 1 📂 WIA1002_1_2017
2017 Sem 2 📂 WIA1002_2_2017
2018 Sem 1 📂 WIA1002_1_2018
2019 Sem 1 📂 WIA1002_1_2019
2019 Sem 2 📂 WIA1002_2_2019
2020 Sem 1 📂 WIA1002_1_2020

📄 Format 2: Application-based Questions (2021 sem 2 - 2024 sem 2)

This format is more similar to WIX1002 Fundamentals of Programming(FOP) — focused on:

  • Applying logical thinking skills
  • File Handling
  • Moderate use of data structures

Unlike Format 1, these questions do not strictly require you to build everything from scratch. In fact, some questions explicity allow the use of Java Collection classes like PriorityQueue.

🧠 This format is great for practicing problem-solving and working with real-world-like input/output scenarios.


⭐ Recommended Questions to Try

Semester Question Concepts used Link
2022 sem 2 Full Graph Implementation Linked List WIA1002_2_2022 Q6
2024 sem 2 Graph Adjacency Matrix and Depth-First Search(DFS) Array
Recursion
WIA1002_2_2024 Q42b
2025 sem 2 Full Graph Implementation ArrayList WIA1002_2_2025 Q4

💡 Suggestion:
In most textbooks and lectures, adjacency lists in graph are commonly implemented using LinkedList. However, for exams, I generally prefer using ArrayList for its simplicity and ease of implementation. It makes the code faster to write and debug — ideal for exams or quick from-scratch implementations. That said, both approaches are valid — feel free to use whatever works best for you!

✨ Honourable Mention: 📂 WIA1002_2_2023

This question set is notoriously cutthroat — requiring deep logical reasoning and intense problem-solving. Personally, I consider it as the most hellish paper I have ever faced. 😵‍💫


📁 List of Question Sets

Semester Link
2021 Sem 2 📂 WIA1002_2_2021
2022 Sem 2 📂 WIA1002_2_2022
2023 Sem 2
Hell
📂 WIA1002_2_2023
2024 Sem 2 📂 WIA1002_2_2024

📄 Format 3: Self-built Implementation and Application (2025 sem 2)

This is a closed test paper but the question topics are listed as below:

Question Topic Subtopics / Focus Areas
Q1 Linked List Singly Linked List
Doubly Linked List
Q2 Queue Circular Array Implementation
Custom Priority Queue
Q3 Search and Sort Insertion Sort
Binary Search
File-Handling (Read File)
Q4 Graph From-scratch Graph Implementation
DFS using Stack/Recursion

⚠️ Sample Question and Answer Link (For Reference Purpose Only)

Semester Link
2025 Sem 2 📂 WIA1002_2_2025

🤝 Contribution

Feel free to fork and submit a pull request to improve my content. Thanks!

🧷 References

Deep Apologies! Sorry that I can't remember all of the names of seniors that help me throughout this course but here are the repositories I usually refer to

About

Collection of solutions for the course WIA1002 DS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages