PRO192_-_SU_2024_-_RE_2466.webp
B

PRO192_-_SU_2024_-_RE_2466.webp

Kizspy | Question: 44 (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
bright_moon
Ngày thêm
Lượt xem
1,967
Lượt bình luận
7
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom