|Latest Update with Complete Solution
Student ID: xxxxxxx
WGU Email:
Date: 05/06/2025
C950 Data Structures and Algorithms II
A. Hash Table
To meet the rubric, I built a custom hash table from scratch without
using Python’s built-in dictionaries or sets. Each package is stored as
a Package object and inserted using its ID as the key.
The table uses a simple modulo-based hash function and handles
collisions via separate chaining—each bucket holds a list of key-value
tuples. It supports fast insert, lookup, remove, and items() operations.
This structure enables constant-time access to package data during
simulation and status checks (Lysecky et al., 2022), ensuring efficient
management of all 40 packages with full control over data handling.
,“Custom-built hash table implementation using chaining with key-value tuples. Supports constant-time insertion, lookup, removal,
and iteration across all 40 packages.”
, B. Look-Up Function
To enable real-time access to package data, I implemented a
lookup(package_id) method inside the custom HashTable class. This
method retrieves a Package object based on its ID in constant time,
enabling fast lookups without using built-in dictionaries.
The package’s delivery status is dynamically determined using the
program’s time-aware interface. The system applies corrections for
time-delayed packages (like Package #9), checks delivery and
departure times, and updates the status as "At the hub", "En route",
or "Delivered at [time]" accordingly.
This look-up feature is used both in the routing simulation and the
interactive CLI. It allows the user to query a single package at any
time and provides live information, including delivery time, truck
assignment, and address (corrected if applicable).
“Time-aware lookup function that applies address corrections, calculates delivery status, and prints package information.”