Đang mở hậu trường...
Chọn đáp án để xem tỉ lệ cộng đồng và giải thích. Câu hỏi được chọn tự động — mọi người cùng làm 1 câu mỗi ngày.
You are implementing a task scheduler that stores 1,000,000 task priorities in a binary min-heap backed by an array. The team now asks you to also report the task with the HIGHEST priority value (the maximum element), without changing the data structure. Assuming no extra bookkeeping is added, what is the worst-case time complexity of finding that maximum element?