Description
see
Assignment 2
Deadline: Day 25/11/2024 @ 23:59
[Total Mark for this Assignment is 8]
Student Details:
Name: ###
ID: ###
CRN: ###
Instructions:
• You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on
Blackboard via the allocated folder. These files must not be in compressed format.
• It is your responsibility to check and make sure that you have uploaded both the correct files.
• Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between
words, hide characters, use different character sets, convert text into image or languages other than English
or any kind of manipulation).
• Email submission will not be accepted.
• You are advised to make your work clear and well-presented. This includes filling your information on the cover
page.
• You must use this template, failing which will result in zero mark.
• You MUST show all your work, and text must not be converted into an image, unless specified otherwise by
the question.
• Late submission will result in ZERO mark.
• The work should be your own, copying from students or other resources will result in ZERO mark.
• Use Times New Roman font for all your answers.
Restricted – مقيد
Question One
Pg. 01
Learning
Outcome(s):
LO2: Outline the
differences
between different
data structures
as well as
searching and
sorting
algorithms.
LO4:
Demonstrate
implemented
solution with
appropriate data
structure and
algorithm for the
assigned
problem.
Restricted – مقيد
Question One
3 Marks
Show the details steps in applying Insertion sort on the following array
{2, 10, 5, 4, 0, 8, 1, 3}.
Step 1 and Step 2 are given to you. Complete the following steps in the same
way as the first 2 steps.
Step 1 (Compare 10 and 2):
The first two elements, 2 and 10, are in the correct order, so no changes are
needed.
Output Array of step 1: {2, 10, 5, 4, 0, 8, 1, 3}
Step 2 (Insert 5 in the correct position):
Compare 5 with 10: Swap 5 and 10.
Compare 5 with 2: No change since 5 > 2.
Output Array of step 2: {2, 5, 10, 4, 0, 8, 1, 3}
NOTE: The work should be your own work and words. Copying from students
or other (online/offline) resources or using AI tools will result in ZERO mark.
Question Two
Pg. 02
Learning
Outcome(s):
LO2: Outline the
differences
between different
data structures
as well as
searching and
sorting
algorithms.
LO4:
Demonstrate
implemented
solution with
appropriate data
structure and
algorithm for the
assigned
problem.
Restricted – مقيد
Question Two
2 Marks
Show the details steps in applying Merge sort on the following array:
{18, 17, 5, 16, 7, 10, 12, 1, 4, 20}.
Use the tree structure shown in Module 10, slides 10-12 to show your work.
NOTE: The work should be your own work and words. Copying from students
or other (online/offline) resources or using AI tools will result in ZERO mark.
Question Three
Pg. 03
Learning
Outcome(s):
CLO1: Describe
basic and
advanced data
structures such
as linked lists,
stacks, and
queues.
Question Three
3 Marks
A ride-sharing company wants to optimize the routes for its drivers to minimize
travel time and fuel consumption. Given a road network represented as a
weighted graph, where nodes are intersections and edges are roads with
associated travel times, the goal is to find the shortest path between a driver’s
current location and their next pickup location.
Which algorithm will be the more suitable for this problem?
In your opinion during the implementation, what type of challenges would be
faced implementation team in the company (Provide at least 3 challenges)?
Restricted – مقيد
Purchase answer to see full
attachment