Java Quiz
10 questions · no time limit
0:00
ALGORITHMS AND COMPLEXITY
Question 1 of 10
No time limit
Current
Answered
Flagged
Not seen
PASSAGE
A LinkedList<Integer> contains nn elements. The following code removes every negative value: Iterator<Integer> it = list.iterator(); while (it.hasNext()) { int value = it.next(); if (value < 0) { it.remove(); } } Assume all values may be negative.
What is the worst-case time complexity of the code?
YOUR PROGRESS
10
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
KEYBOARD
Pick an answer ABCD
Next question ↵→
Previous ←
Flag for review F