PRO192_-_SU_2024_-_Block_5_-_FE_2618.webp
Quốc Hùng2

PRO192_-_SU_2024_-_Block_5_-_FE_2618.webp

Kizspy | Question: 43 (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
Quốc Hùng2
Ngày thêm
Lượt xem
2,867
Lượt bình luận
13
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom