- Học kỳ
- SU2026
- Thời Gian
- 9/8/26
- Loại tài liệu
- FE
CSD201 SU26 FE RE
CSD201 SU26 FE RE Questions
This document contains a set of multiple-choice questions from a CSD201 exam. The questions cover fundamental data structures such as singly and doubly linked lists, time complexities of node insertion, operations on linked lists, and the applicability of binary search algorithms.CSD201 SU26 FE RE Questions
Câu 1
Select the statement that is most correct.
Basically, the complexity of inserting new element before a given node in the middle of a singly linked lists is
A. O(n^2)
B. O(1)
C. O(log n)
D. O
Câu 2
Select the statement that is most correct.
Suppose we are considering a doubly linked list which has at least 2 nodes. What does the java code snippet below do?
Node f = tail.prev; // prev is a link to predecessor node
Node q = new Node(x);
q.prev = f; q.next = tail;
f.next = q; tail.prev = q;
A. It creates new node with value x at the middle of the list.
B. It inserts new node with value x after the last node.
C. It replaces the last node with new node with value x.
D. It inserts new node with value x before the last node.
Câu 3
Select the statement that is most correct.
Basically, the complexity of inserting a node after a given node in a singly linked lists is
A. O
B. O(1)
C. O(log n)
D. O(n^2)
Câu 4
Consider the fun() method in a singly linked list below:
void fun()
{ if (isEmpty()) return;
if (head == tail)
head = tail = null;
else head = head.next;
}
Specify the correct statement about the fun() method in the code above (choose the most suitable one).
A. It removes the last element of the list
B. It removes the first element of the list
C. It removes the second element of the list
D. It returns the first element of the list
Câu 5
Binary search algorithm cannot be applied to
A. sorted linear array
B. sorted singly linked list
C. Binary search tree
Đính kèm
-
CSD201 SU26 FE RE_001.webp29.4 KB · Lượt xem: 41 -
CSD201 SU26 FE RE_002.webp60.6 KB · Lượt xem: 33 -
CSD201 SU26 FE RE_003.webp31.2 KB · Lượt xem: 35 -
CSD201 SU26 FE RE_004.webp53.8 KB · Lượt xem: 25 -
CSD201 SU26 FE RE_005.webp28.7 KB · Lượt xem: 18 -
CSD201 SU26 FE RE_006.webp65.9 KB · Lượt xem: 21 -
CSD201 SU26 FE RE_007.webp50.8 KB · Lượt xem: 19 -
CSD201 SU26 FE RE_008.webp47.4 KB · Lượt xem: 19 -
CSD201 SU26 FE RE_009.webp59.5 KB · Lượt xem: 16 -
CSD201 SU26 FE RE_010.webp50.5 KB · Lượt xem: 15 -
CSD201 SU26 FE RE_011.webp26.2 KB · Lượt xem: 18 -
CSD201 SU26 FE RE_012.webp65.6 KB · Lượt xem: 15 -
CSD201 SU26 FE RE_013.webp46.5 KB · Lượt xem: 15 -
CSD201 SU26 FE RE_014.webp72.6 KB · Lượt xem: 15 -
CSD201 SU26 FE RE_015.webp84.5 KB · Lượt xem: 15 -
CSD201 SU26 FE RE_016.webp63.6 KB · Lượt xem: 14 -
CSD201 SU26 FE RE_017.webp62.7 KB · Lượt xem: 15 -
CSD201 SU26 FE RE_018.webp47.9 KB · Lượt xem: 14 -
CSD201 SU26 FE RE_019.webp76 KB · Lượt xem: 15 -
CSD201 SU26 FE RE_020.webp80.1 KB · Lượt xem: 12 -
CSD201 SU26 FE RE_021.webp75.8 KB · Lượt xem: 12 -
CSD201 SU26 FE RE_022.webp42 KB · Lượt xem: 13 -
CSD201 SU26 FE RE_023.webp39 KB · Lượt xem: 12 -
CSD201 SU26 FE RE_024.webp60.7 KB · Lượt xem: 12 -
CSD201 SU26 FE RE_025.webp57.7 KB · Lượt xem: 10 -
CSD201 SU26 FE RE_026.webp38.3 KB · Lượt xem: 10 -
CSD201 SU26 FE RE_027.webp43.2 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_028.webp44 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_029.webp39.8 KB · Lượt xem: 10 -
CSD201 SU26 FE RE_030.webp49.5 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_031.webp45.1 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_032.webp41.4 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_033.webp39.4 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_034.webp70.6 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_035.webp38 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_036.webp37.7 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_037.webp42.6 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_038.webp42.7 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_039.webp22.6 KB · Lượt xem: 11 -
CSD201 SU26 FE RE_040.webp48 KB · Lượt xem: 11 -
CSD201 SU26 FE RE_041.webp62.3 KB · Lượt xem: 11 -
CSD201 SU26 FE RE_042.webp109.8 KB · Lượt xem: 10 -
CSD201 SU26 FE RE_043.webp105.6 KB · Lượt xem: 10 -
CSD201 SU26 FE RE_044.webp39.8 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_045.webp54.2 KB · Lượt xem: 10 -
CSD201 SU26 FE RE_046.webp51.8 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_047.webp81.7 KB · Lượt xem: 8 -
CSD201 SU26 FE RE_048.webp84.5 KB · Lượt xem: 9 -
CSD201 SU26 FE RE_049.webp36.3 KB · Lượt xem: 10 -
CSD201 SU26 FE RE_050.webp35.9 KB · Lượt xem: 39


