Q50.webp
ThanhTam81

Q50.webp

Kizspy | Question: 50
(Choose 1 answer)
You are developing a contact management system, and you need to quickly find a contact by their phone
number. Explain how you would use Java collections to efficiently search for a contact based on a specific
criterion.
A. Use a HashMap with phone numbers as keys for O(1) lookup.
B. Implement a linear search through the list of contacts.
C. Utilize Collections.binarySearch() with a sorted list.
D. Choose a HashSet for efficient phone number-based searching.
E. Implement a custom trie data structure for optimized searching.
F. Use Collections.max() with a custom comparator for finding the maximum value.

Thông tin

Category
PRO192
Thêm bởi
ThanhTam81
Ngày thêm
Lượt xem
2,035
Lượt bình luận
6
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom