CS210 · Prince Sultan University

Sorting 3,432 registrations, timed in ms.

An intelligent system for analysing students’ course registrations. Records are stored in a self-developed linked list, scored for course demand, and sorted with four algorithms that are timed against their theoretical complexity.

O(1) tail insert Merge Sort · 17 ms
Main.java reading
head → LinkedList<Registration>
size 0 format id;course;level;hour
3,432
Registrations read & validated
4
Sorting algorithms compared
17ms
Merge Sort on the full dataset
15
Java source files, one job each
00 · Abstract

Developing an intelligent system for students’ course registration analysis.

This project designed an intelligent system for managing students’ course registration records at Prince Sultan University. It predicts course demand using data structures such as linked lists and arrays, together with sorting algorithms.

Records are stored in a self-developed linked list, and four sorting algorithms (Selection Sort, Insertion Sort, Merge Sort and Quick Sort) are compared on their time-complexity performance.

The results matched theory. On a dataset of more than 3,000 records, Merge Sort and Quick Sort, both O(n log n), beat Selection Sort and Insertion Sort, both O(n²), by a wide margin. This confirms that choosing the right algorithm matters for managing large data efficiently.

01 · System design

Three phases turn raw registrations into demand insight.

The system takes student course registration records and works out how much demand each course has. The data is then sorted four times, and each sort is timed.

01

Data collection

Gathers about 3,000 registration records, each with a student ID, course ID, current study level and enrollment time. Every record is checked for correctness and completeness.

InputValidatorLinkedList
02

Processing

For each node, the demand scorer calculates a score from four criteria: a base score, a class multiplier, the time of registration, and the course ID priority.

DemandScorer
03

Documentation

Writes the results to a new file with each student’s demand score. The data is left unsorted so the sorting algorithms can be performance-tested afterwards.

FileService
02 · Watch them race

Same input, four algorithms, every comparison counted.

Each lane sorts the same shuffled array of 36 values in descending order, just like the project. They all advance at the same number of comparisons per frame, so the finishing order reflects how much work each algorithm does.

sorting-race · n = 36
Selection Sort O(n²)0 comparisons
Insertion Sort O(n²)0 comparisons
Merge Sort O(n log n)0 comparisons
Quick Sort O(n log n)0 comparisons
03 · Measured on 3,432 records

The O(n log n) sorts win.

On 3,432 registrations, Merge Sort finished in 17 ms and Quick Sort in 22 ms. Insertion Sort took 26 ms and Selection Sort took 45 ms, as their O(n²) complexity predicts.

sort time · milliseconds O(n²)O(n log n)
Selection Sort
45 ms
Insertion Sort
26 ms
Quick Sort
22 ms
Merge Sort
17 ms
CS210 · Section 951 · Dr. Najla Althuniyan

Read the full write-up, or run the code yourself.

The report covers the method, tables and discussion. The repository has the source and the input data.