Editorial for Sưu tầm là trúng


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Author: Yunan

Ta đơn giản sử dụng cấu trúc Map để lưu lại các giá trị phân biệt, đồng thời lưu trữ tần số xuất hiện của các giá trị.

Độ phức tạp: O(n.log(n)).


Comments