0% found this document useful (0 votes)
16 views2 pages

Cuitm205 Assignments

The document outlines two assignments for a Data Structures and Algorithms course, with specific due dates and tasks. Assignment 1 focuses on definitions, stack operations in Python, and tree traversal methods, while Assignment 2 covers heap types, search advantages and disadvantages, sorting importance, binary search, and Dijkstra's algorithm for shortest path calculation. Both assignments require written explanations and coding implementations.

Uploaded by

chagwenac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Cuitm205 Assignments

The document outlines two assignments for a Data Structures and Algorithms course, with specific due dates and tasks. Assignment 1 focuses on definitions, stack operations in Python, and tree traversal methods, while Assignment 2 covers heap types, search advantages and disadvantages, sorting importance, binary search, and Dijkstra's algorithm for shortest path calculation. Both assignments require written explanations and coding implementations.

Uploaded by

chagwenac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

DATA STRUCTURES AND ALGORITHMS CUITM205

ASSIGNMENT 1 DUE- 07 MARCH 2025_SOFTCOPY_INDIVIDUAL ASSIGNMENT

QUESTION 1

a) Define the following terms as used in Data structures and algorithms


i) Algorithm [2]
ii) Time complexity [2]

iii) Compile time [2]

iv) Stack [2]

v) Big O notation

b) Using Python write a code that implements any 2 stack operations


[10]

c) Using the binary tree below perform the following Tree traversal

i. Postorder [5]
ii. Inorder [5]
ASSIGNMENT 2 DUE- 07 MARCH 2025_HARDCOPY_GROUP ASSIGNMENT
QUESTION 1

a) State and explain the two types of Heaps? [4]


b) Identify 2 advantages and 2 disadvantages of Linear search [4]
c) Why is sorting important? [2]

QUESTION 2
Given a sorted list below demonstrate how the target element 7 can be located using a binary
search algorithm

[10]

QUESTION 3
Routers P, Q, R, S, T, U, V and W in a network are represented in the following undirected
graph. The weights on the edges is the time it takes in seconds to transmit data packets
between routers in the network

Use Dijkstra’s algorithm to find the shortest path from router P to other routers in the network
and determine the shortest path of transmitting data from Router P to router W [10]

You might also like