Q38.webp
vanhoa2005

Q38.webp

Question: 38
(Choose 1 answer)
You are tasked with implementing a system that tracks the frequency of words in a large text document.
Explain how you would use a Java collection to efficiently achieve this, emphasizing the principles of
abstraction and encapsulation.
A. Utilize a HashMap<String, Integer> for efficient word frequency tracking.
B. Implement a LinkedList<String> to store words and their occurrences.
C. Use a PriorityQueue<String> to prioritize words based on frequency.
D. Employ a HashSet<String> for unique word storage.
E. Implement a custom WordFrequency Tracker class using a binary search tree.
F. Utilize a TreeMap<String, Integer> for a sorted mapping of words and frequencies.

Thông tin

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

Share this media

Back
Bên trên Bottom