Question 10
Back to Exercise
For a TreeMap with keys 10, 20, 30, what does floorKey(25) return?
- A 30
- B 20 Correct
- C 25
- D null
Correct Answer: Option B
The greatest key ≤ 25. ceilingKey(25) would be 30.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!