Kingdom of Saudi Arabia
Ministry of Education
Prince Sattam Bin Abdulaziz University P'tt:lt ;rg
College of Computer t"ll + dl ft}l..pr)liltq
Engineering and sciences iiirlyXgrxrh|rr5 ..-bJl t/e: a-.t l 45
Department of Computer Sciences hnc Srttur la ll*&rt Udwrit
.i-t:.ll l9b F-
Course Title and Code:
Dats Structures and Algorithms, C52321
Instructor Name:
Final Exam +;Jl dt\ ;aJuHr/ +Lhlt r.,,'l
Semester I :(#l+ll dJll
Date: January 15,2017 1437tr438
Time: 120 minutes ,ia,.iltp.r
Instructions d.it-Jri
. This exam consists of(6) questions on 10
pages.
,>b*i.," \ . ,lr ilz.l (f )Cf Jlj, lL:-Yl U.r I
+oiy
' All questions should be answered on the same olpYtr; ,J, al:^"!lC:r & -rt- r
sheets
. Electronic devices that could have a memory
6ft5 & €* ar:;iyr ;j{_?VlJt-:-lCr. r
Qt
.
is not allowed
lofli ,.r1r; :, .t-llal)l JL* ! C*r r
Traditional calculator is allowed
. Examination rules must be adhered. .-,Ut*:,!t €95 *t; g-4 pllyr.-4 r
.
e** y r
Books or other related materials are NOT *S
srt*:,Yl al-eJl -:li:5.1t -KJU
allowed '];-lt -1i
o Use blue pen only 6 ot:\r,$t! oF..,t<Jt I
tor ||fficial Use 0nly
First Markinq Second Marking
Question Obtained Instructor's Obtained
No. Marks Signature Marks'
Q.l cl-o l-5 10
Q.2 CLO 1 6
Q.3 CLO 2 6
Q.4 CLO 2,4 6
Q.s CLO 2,3 6
Q.1 CLO 3 6
Iotal Malfis 40
TotalMarks in words
Name of lnstructors l. Mrs. Wamda Nagmeldine 2. Dr. MahdiKhemakhem
Name of Peer-Reviewer
cs2321 - Data structures and Algorithms - Final Exam, semester I, 20t 6/2017 Page; 7 of l0
, 1: Multiple Choice 10 marks
tl A pointer
a) Refers to many variables.
b) Contains the value of a variable.
c
d)
Contains the address of a variable.
None of the above.
2/ The name of an array represents
a) a pointer to its last case.
b) a pointer to its first case.
c) a reference to its first case.
@ both ofb) and c).
3/ What is correct equivalence between the next subscript and offset notations
a) t[i]=2;4=2 *1+i:2;.
@
c)
t[i]=2; <=> *(1+i):2;.
t[i][]:2; <:> **1+i+j=/;.
d) t[i]Lil:2; <:>'F(*t+'+')-2'.
4l Algorithm analysis means
a) how to define correctly a set of variables.
b) how to efficiently store, access, manage data.
@ how to predict an algorithm's performance.
d) none ofthe above
5/ When comparing two algorithms they should be
a) run on a super computer.
b) run on different machines.
@ run on the same machine with the same setup.
d) run on the same machine with different setup.
6/ What is the time complexity when insert an element at the second position of a linked
list?
@ o(1).
b) O(/?).
c) o(n').
d) O(log n).
If two algorithms ^41and A2 have respectivelv the running time complexities O(nlogn)and
O(Io92n), then the efficiency of
l\ is better than A2.
&
c)
^42 is better than Al.
.41is equal to AZ one.
d) none ofthe above.
CS232l - Data Structures and Alsorithms - Final Exam. Semester I. 2016/2017 Page:2 of l0
Ministry of Education
Prince Sattam Bin Abdulaziz University P'tt:lt ;rg
College of Computer t"ll + dl ft}l..pr)liltq
Engineering and sciences iiirlyXgrxrh|rr5 ..-bJl t/e: a-.t l 45
Department of Computer Sciences hnc Srttur la ll*&rt Udwrit
.i-t:.ll l9b F-
Course Title and Code:
Dats Structures and Algorithms, C52321
Instructor Name:
Final Exam +;Jl dt\ ;aJuHr/ +Lhlt r.,,'l
Semester I :(#l+ll dJll
Date: January 15,2017 1437tr438
Time: 120 minutes ,ia,.iltp.r
Instructions d.it-Jri
. This exam consists of(6) questions on 10
pages.
,>b*i.," \ . ,lr ilz.l (f )Cf Jlj, lL:-Yl U.r I
+oiy
' All questions should be answered on the same olpYtr; ,J, al:^"!lC:r & -rt- r
sheets
. Electronic devices that could have a memory
6ft5 & €* ar:;iyr ;j{_?VlJt-:-lCr. r
Qt
.
is not allowed
lofli ,.r1r; :, .t-llal)l JL* ! C*r r
Traditional calculator is allowed
. Examination rules must be adhered. .-,Ut*:,!t €95 *t; g-4 pllyr.-4 r
.
e** y r
Books or other related materials are NOT *S
srt*:,Yl al-eJl -:li:5.1t -KJU
allowed '];-lt -1i
o Use blue pen only 6 ot:\r,$t! oF..,t<Jt I
tor ||fficial Use 0nly
First Markinq Second Marking
Question Obtained Instructor's Obtained
No. Marks Signature Marks'
Q.l cl-o l-5 10
Q.2 CLO 1 6
Q.3 CLO 2 6
Q.4 CLO 2,4 6
Q.s CLO 2,3 6
Q.1 CLO 3 6
Iotal Malfis 40
TotalMarks in words
Name of lnstructors l. Mrs. Wamda Nagmeldine 2. Dr. MahdiKhemakhem
Name of Peer-Reviewer
cs2321 - Data structures and Algorithms - Final Exam, semester I, 20t 6/2017 Page; 7 of l0
, 1: Multiple Choice 10 marks
tl A pointer
a) Refers to many variables.
b) Contains the value of a variable.
c
d)
Contains the address of a variable.
None of the above.
2/ The name of an array represents
a) a pointer to its last case.
b) a pointer to its first case.
c) a reference to its first case.
@ both ofb) and c).
3/ What is correct equivalence between the next subscript and offset notations
a) t[i]=2;4=2 *1+i:2;.
@
c)
t[i]=2; <=> *(1+i):2;.
t[i][]:2; <:> **1+i+j=/;.
d) t[i]Lil:2; <:>'F(*t+'+')-2'.
4l Algorithm analysis means
a) how to define correctly a set of variables.
b) how to efficiently store, access, manage data.
@ how to predict an algorithm's performance.
d) none ofthe above
5/ When comparing two algorithms they should be
a) run on a super computer.
b) run on different machines.
@ run on the same machine with the same setup.
d) run on the same machine with different setup.
6/ What is the time complexity when insert an element at the second position of a linked
list?
@ o(1).
b) O(/?).
c) o(n').
d) O(log n).
If two algorithms ^41and A2 have respectivelv the running time complexities O(nlogn)and
O(Io92n), then the efficiency of
l\ is better than A2.
&
c)
^42 is better than Al.
.41is equal to AZ one.
d) none ofthe above.
CS232l - Data Structures and Alsorithms - Final Exam. Semester I. 2016/2017 Page:2 of l0