Types of Research

Types of Research

University

31 Qs

quiz-placeholder

Similar activities

C-Volution (Easy 1)

C-Volution (Easy 1)

University

30 Qs

QUIZ

QUIZ

University

30 Qs

2nd Year Data Structures Quiz Qn

2nd Year Data Structures Quiz Qn

University

35 Qs

Code Nascar

Code Nascar

University

30 Qs

Kuis_04_Organisasi dan Arsitektur Komputer_Bab 9-10

Kuis_04_Organisasi dan Arsitektur Komputer_Bab 9-10

University

30 Qs

Algorithm Efficiency and Data Structures Quiz

Algorithm Efficiency and Data Structures Quiz

University

32 Qs

Kuis_2_AI Bab 3-4

Kuis_2_AI Bab 3-4

University

31 Qs

Page 1

Page 1

12th Grade - University

30 Qs

Types of Research

Types of Research

Assessment

Quiz

Information Technology (IT)

University

Medium

Created by

Jhulyna Rubio

Used 1+ times

FREE Resource

31 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which Java package includes the LinkedList class?

a. java.lang

b. java.util

c. java.collections

Answer explanation

The LinkedList class is part of the java.util package.

2.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which is an advantage of linked lists over arrays?

A) Constant-time random access

B) Static memory allocation

C) Dynamic resizing

D) Lower memory usage

Answer explanation

Linked lists grow/shrink dynamically without preallocating memory.

3.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

How do you traverse a singly linked list?

A) Start at the tail and follow "prev" references

B) Start at the head and follow "next" references

C) Use binary search

D) Access elements by index

Answer explanation

Singly linked lists only allow forward traversal starting from the head.

4.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What type of linked list allows traversal in both directions

a) Singly Linked List

b) Doubly Linked List

c) Circular Linked List

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

LinkedList<String> list = new LinkedList<>();

// Initial elements

list.add("Alice");

list.add("Bob");

list.add("Charlie");

// Situation: You need to perform the following operations:

// 1. Add "David" at the second position.

// 2. Remove "Charlie" from the list.

// 3. Change "Bob" to "Brian".

What is the correct set of operations?

a. list.add(1, "David");

list.remove("Charlie");

list.set(2, "Brian");

b. list.add(2, "David");

list.remove(2);

list.set(1, "Brian");

c. list.addLast("David");

list.removeFirst();

list.set(1, "Brian");

d. list.add("David");

list.remove("Charlie");

list.set(1, "Brian");

6.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

How do you determine the length of an array arr in Java?

a) arr.length()

b) arr.length

c) arr.size()

d) arr.getLength()

7.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which of the following is the correct way to declare and allocate memory in an integer array in Java?

a) int arr = new int[5];

b) int arr[] = new int[5];

c) int[] arr = new int[5];

d) Both (b) and (c)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?