Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Transcript

# UNIVERSIDAD DE DAGUPAN ## SCHOOL OF INFORMATION TECHNOLOGY EDUCATION ## ITC04 | DATA STRUCTURES & ALGORITHM ## PRELIM EXAM REVIEWER ### PART-1-MULTIPLE CHOICES Choose from among the choices the answer that best fits the requirement. Write your answers in UPPERCASE format. #### 1. Data Structure...

# UNIVERSIDAD DE DAGUPAN ## SCHOOL OF INFORMATION TECHNOLOGY EDUCATION ## ITC04 | DATA STRUCTURES & ALGORITHM ## PRELIM EXAM REVIEWER ### PART-1-MULTIPLE CHOICES Choose from among the choices the answer that best fits the requirement. Write your answers in UPPERCASE format. #### 1. Data Structure 1. Which of the following is a linear data structure? * A) Tree * B) Graph * C) Stack * D) HashMap #### 2. What is the time complexity of accessing an element in an array by its index? * A) O(n) * B) O(log n) * C) O(1) * D) O(n^2) #### 3. In a queue, how is the order of elements processed? * A) Last-In-First-Out (LIFO) * B) First-In-First-Out (FIFO) * C) Random order * D) None of the above #### 4. Which of the following data structures allows insertion and deletion at both ends? * A) Stack * B) Queue * C) Linked List * D) Deque #### 5. What is the primary difference between an ArrayList and a LinkedList in Java? * A) ArrayList allows duplicate values, LinkedList does not * B) ArrayList uses dynamic arrays, LinkedList uses doubly linked nodes * C) ArrayList is faster for inserting/removing elements at the beginning, LinkedList is faster at accessing elements * D) LinkedList is backed by arrays, ArrayList by nodes #### 6. Which primitive data type has a precision of approximately 15 decimal digits? * A) float * B) double * C) int * D) char #### 7. How many bits does the short primitive data type occupy in Java? * A) 8 * B) 16 * C) 32 * D) 64 #### 8. Which primitive data type has a range of -2^15 to 2^15-1 in Java? * A) short * B) int * C) long * D) byte #### 9. What is the size (in bytes) of the long primitive data type in Java? * A) 2 * B) 4 * C) 8 * D) 16 #### 10. Which of the following primitive types is the smallest in terms of storage size? * A) byte * B) short * C) int 1ST Semester Academic Year: 2024-2025 1

Tags

data structures algorithms computer science
Use Quizgecko on...
Browser
Browser