0% found this document useful (0 votes)
12 views4 pages

الاختبار النهائي هياكل بيانات هبه المروعي

The document is a final exam for a Data Structures course at a Computer Science department, taught by Dr. Heba Al-Mroui for the second level during the academic year 2023-2024. It contains multiple-choice questions covering various topics related to data structures, algorithms, and their complexities. The exam assesses students' understanding of concepts such as postfix expressions, arrays, queues, stacks, and time complexity.

Uploaded by

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

الاختبار النهائي هياكل بيانات هبه المروعي

The document is a final exam for a Data Structures course at a Computer Science department, taught by Dr. Heba Al-Mroui for the second level during the academic year 2023-2024. It contains multiple-choice questions covering various topics related to data structures, algorithms, and their complexities. The exam assesses students' understanding of concepts such as postfix expressions, arrays, queues, stacks, and time complexity.

Uploaded by

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

‫ كلية الحاسوب وتكنولوجيا‬:‫الكلية‬

.‫ هياكل بيانات‬:‫المادة‬
.‫المعلومات‬
.‫ االمتحان النهائي‬:‫الموضوع‬
.‫ علوم حاسوب‬:‫القسم‬
‫ هبه المروعي‬:‫الدكتورة‬ .‫ الثاني‬:‫المستوى‬

‫م‬2023-2024

1 The postfix form of the expression (A+ B) *(C*D- E) *F / G is?


A AB+ CD*E – FG /**
B AB + CD* E – F **G /
C AB + CD* E – *F *G /
D AB + CDE * – * F *G /
2 What are the advantages of arrays?
A Objects of mixed data types can be stored
B Elements in an array cannot be sorted
C Index of first element of an array is 1
D Easier to store elements of same data type
3 What is the data structure that uses in round robin scheduling?
A Stack.
B Circular queue.
C Linear queue.
D Double ended queue.
4 Execution the process in CPU is one of stack application.
A True
B False
5 What is the Big oh of the following function (N2 + N)/N is
A O (log n)
B O (n2)
C O(n)
D O (1)
6 Find the equivalent of the following expression (2 3 1 * + 9 - ) is
A 4
B -4
C 1
D 9
7 Big oh of the following function (N log N + N log (N2)) is
A O (n log n)
B O(n^2)
C O(n)
D O (log n)

)23 ‫عمل الطالب محيي الدين طه العرجلي (دفعة‬ 1


‫ كلية الحاسوب وتكنولوجيا‬:‫الكلية‬
.‫ هياكل بيانات‬:‫المادة‬
.‫المعلومات‬
.‫ االمتحان النهائي‬:‫الموضوع‬
.‫ علوم حاسوب‬:‫القسم‬
‫ هبه المروعي‬:‫الدكتورة‬ .‫ الثاني‬:‫المستوى‬

‫م‬2023-2024
8 If you have the following elements A, B, C, D and E pushed into a stack in order
starting form A then pop four items into a queue after that delete two items from the
queue and push them back to the stack.
What would be the item in the top
A A
B B
C C
D D
9* Big oh of the following function (N + log N + N/2) is
A O (n log n)
B O (n2)
C O(n)
D O (log n)
10 What is the best data structure that is used for re-undo and undo operations?
A Stack
B Queue
C Binary Tree
D Linked list
11 What is the time complexity to display items in a single linked list in reverse case?
A O (n log n)
B O (n2)
C O (n)
D O (log n)
12 The circular Queue is full if
A Count == size - 1
B Front == size - 1
C Rear == size - 1
D Count == size
13 O (n) slower than O (log n)
A True
B False
14 If the rear = 0 and front = 0 then Queue will be full if:
A Rear == size
B Rear == size-1
C Front == size – 1
D Front == rear

)23 ‫عمل الطالب محيي الدين طه العرجلي (دفعة‬ 2


‫ كلية الحاسوب وتكنولوجيا‬:‫الكلية‬
.‫ هياكل بيانات‬:‫المادة‬
.‫المعلومات‬
.‫ االمتحان النهائي‬:‫الموضوع‬
.‫ علوم حاسوب‬:‫القسم‬
‫ هبه المروعي‬:‫الدكتورة‬ .‫ الثاني‬:‫المستوى‬

‫م‬2023-2024
15 What is the time complexity of this code?
int sum = 0;
for (int i = 0; i < n + 100; i++)
{
for(int j = 0; j < i; j++)
{
sum += j;
}
}
A O (n log n)
B O (n2)
C O (n)
D O (n3)
16* What is the time complexity of searching an item in a single linked list?
A O (n log n)
B O (n2)
C O (n)
D O (log n)
17 What is the time complexity to finding the duplicate values in a single Linked List?
A O (n log n)
B O (n2)
C O (n)
D O (n3)
18 The element in queue removed from the front but the inserted only at the back.
A True
B False
19 Stack can used to add and delete value from either end.
A True
B False
20 What is the prefix of this infix expiration: A + (B/C)*(C-A)^F^H
A +A/*BC^^-DAFH
B +A*/BC^^-DAFH
C +A/*BC^-^DAFH
D +A*/BC-^^DAFH
21 Linked List must be store
A Element for Node.
B Link to the next node if it exists.
C Both A and B
D None of the above.
)23 ‫عمل الطالب محيي الدين طه العرجلي (دفعة‬ 3
‫ كلية الحاسوب وتكنولوجيا‬:‫الكلية‬
.‫ هياكل بيانات‬:‫المادة‬
.‫المعلومات‬
.‫ االمتحان النهائي‬:‫الموضوع‬
.‫ علوم حاسوب‬:‫القسم‬
‫ هبه المروعي‬:‫الدكتورة‬ .‫ الثاني‬:‫المستوى‬

‫م‬2023-2024
22 The time complexity to pushing even value into stack
A O (n2)
B O (n)
C O (log n)
D O (1)
23 O (g(n)) = O (g(n))   O (g(n)) is true
A True
B False
24 What is the time complexity of this function?
int f2(int n)
{
int x = 0;
for(int i = 0; i < n; i++)
{
for(int j = 0; j < m; j++)
{
x++;
}
}
return x;
}

A O (n2)
B O (n)
C O (log n)
D None of the above.
25 the time complexity of push an element in a stack contains n elements O (n)
A True
B False

- :‫مالحظة هامة‬
<<‫>>الكمال للـه سبحانه وتعالى‬
‫لذلك على من وجد أي خطأ فليتكرم بالتعديل‬

)23 ‫عمل الطالب محيي الدين طه العرجلي (دفعة‬ 4

You might also like