• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 16 páginas
Otro

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

Document preview thumbnail
Vista previa 3 fuera de 16 páginas

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

Vista previa del contenido

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.”

Información del documento

Subido en
12 de mayo de 2025
Número de páginas
16
Escrito en
2024/2025
Tipo
Otro
Personaje
Desconocido
$18.39

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
professoraxel
3.8
(493)
Vendido
2648
Seguidores
1583
Artículos
20554
Última venta
12 horas hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes