Q49.webp
vanhoa2005

Q49.webp

Question: 49
(Choose 1 answer)
You are developing an e-commerce platform, and you need to display a list of products sorted by their prices
in ascending order. Explain how you would use Java collections to achieve efficient sorting, and choose the
most suitable sorting algorithm for this scenario.
A. Use Collections.sort() with a custom comparator.
B. Implement a custom quicksort algorithm for precise control.
C. Choose Arrays.sort() for simplicity and performance.
D. Utilize a PriorityQueue for automatic sorting during insertion.
E. Implement a custom bubble sort algorithm for educational purposes.
F. Use Comparator.reverseOrder() for descending order sorting.

Thông tin

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

Share this media

Back
Bên trên Bottom