• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 16 pages
Other

WGU C950 Data Structures and Algorithms II Task 2 |Latest Update with Complete Solution

Document preview thumbnail
Preview 3 out of 16 pages

WGU C950 Data Structures and Algorithms II Task 2 |Latest Update with Complete Solution

Content preview

WGU C950 Data Structures and Algorithms II Task 2
|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.”

Document information

Uploaded on
May 12, 2025
Number of pages
16
Written in
2024/2025
Type
Other
Person
Unknown
$18.39

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
professoraxel
3.8
(493)
Sold
2648
Followers
1583
Items
20554
Last sold
8 hours ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions