Assignment 1: Deadline: Day 4/9/2023 at 23:59
Assignment 1: Deadline: Day 4/9/2023 at 23:59
Assignment 1: Deadline: Day 4/9/2023 at 23:59
Data Structure
IT245
Assignment 1
Deadline: Day 4/9/2023 @ 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.
Pg. 1 Question TwoQuestion Two
Learning 4 Marks
Outcome(s): Question One
CLO 3
For each of the following program fragments:
Calculate and Give an analysis of the running time (Big-Oh).
Justify your answer?
analyze the
complexity of
small to medium
A.
programs built
public class GFG {
with basic data
// Linearly search x in att[]. if x is present then
structures.
//return the index , otherwise return -1
static int search (int arr[], int n, intx)
{
int i;
for (i = 0: i<n;i++){
if (arr[i] ==x){
return i;
}
}
return -1;
}
B.
sum=0;
for( i = 0; i < n; i++ )
for( j = 0; j < i * i; j++ )
for( k = 0; k < j; k++ )
sum++;
[Marking criteria: 1 mark for answer, 1 mark for the Justify]
Pg. 3 Question TwoQuestion Two
4 Marks
Learning
Outcome(s): Question Two
CLO 1
A. Discuss the differences between the Circular linked list and
Describe basic Doubly Circular linked list.
and advanced
data structures [Marking criteria: 1 mark for each linked list type]
such as linked
lists, stacks, and B. Discuss the differences between the ArrayList and LinkedList.
queues.
[Marking criteria: 0.5 mark for every difference]