• ¿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 2 fuera de 8 páginas
Otro

WGU C950 NHP3 Task 1: PS Routing Program Planning | Passed on First Attempt |Latest Update with Complete Solution

Document preview thumbnail
Vista previa 2 fuera de 8 páginas

WGU C950 NHP3 Task 1: PS Routing Program Planning | Passed on First Attempt |Latest Update with Complete Solution

Vista previa del contenido

WGU C950 NHP3 Task 1: PS Routing Program
Planning | Passed on First Attempt |Latest
Update with Complete Solution




Bachelor of Science, Computer Science
Data Structures and Algorithms II –
Filipe Araujo
Student ID: xxxxxxxxx


A. Identify a named self-adjusting algorithm (e.g., nearest neighbor
algorithm, greedy algorithm) that could be used to create your
program to deliver the packages.
For the WGUPS routing program, I used the Nearest Neighbor Algorithm as
an appropriate self-adjusting algorithm to create the delivery routing
solution. The Nearest Neighbor Algorithm is a greedy algorithm that selects
the closest unvisited location from the current position and moves to that
location. This process repeats until all places have been visited.

B. Identify a self-adjusting data structure, such as a hash table, that
could be used with the algorithm identified in part A to store the
package data.
I used a Hash Table as an appropriate self-adjusting data structure with the
Nearest Neighbor Algorithm to efficiently store and manage the package
data. A hash table is a data structure that uses a hash function to associate
keys with values, enabling fast insertion, deletion, and lookup operations.

, B1. Explain how your data structure accounts for the relationship
between the data components you are storing.
The hash table supports the relationships between stored data in the
following ways:
1. Key-Value Mapping: Each package is stored with its unique ID as
the key, enabling O(1) average-case lookup time. This is critical for
fast access during route planning and status updates.
2. Data Organization: The value associated with each key will be a
Package object containing all relevant package information, including
delivery address, deadline, city, zip code, weight, and delivery status.
This organization allows for efficient storage and retrieval of all
package attributes.
3. Relationship Preservation: The hash table maintains the
relationship between packages and their attributes while allowing
quick access to specific packages by their ID. This is essential for
tracking package status and updating information (such as the
address correction for package #9 from 300 State St to 410 S State St
at 10:20 a.m.).
4. Dynamic Updates: The hash table supports efficient updates to
package information, which is necessary for handling the address
correction for package #9 at 10:20 a.m. and updating delivery status
as packages are delivered.
5. Flexible Querying: While the primary key is the package ID, the
implementation can include methods to query packages based on
other attributes such as delivery deadline or address, facilitating the
grouping of packages for efficient routing (e.g., packages 14, 15, and
19 that must be delivered together).
Because of its constant-time access and update capabilities, the hash table
pairs well with the Nearest Neighbor Algorithm, which depends on frequent
lookups and updates during route optimization.

C. Write an overview of your program in which you do the following:
C1. Explain the algorithm’s logic using pseudocode.
This pseudocode outlines the core logic of the delivery algorithm,
incorporating the Nearest Neighbor approach while accounting for the
specific constraints of the WGUPS scenarios, such as delivery deadlines,
special notes, truck restrictions, and the address correction for package #9.

Información del documento

Subido en
10 de junio de 2025
Número de páginas
8
Escrito en
2024/2025
Tipo
Otro
Personaje
Desconocido
$17.79

¿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