HF RL Explorer

Task: Find the 100 Largest Numbers from a Large Array

Task: Find the 100 Largest Numbers from a Large Array: a task in Terminal-Lego-15k (Harbor dataset). Write a program that efficiently finds the 100 largest numbers from a large array of numbers. Your solution must perform significantly better than O(n log n) full-sort approaches — specifically, it…

The task

Write a program that efficiently finds the 100 largest numbers from a large array of numbers. Your solution must perform significantly better than O(n log n) full-sort approaches — specifically, it should achieve O(n log k) time complexity where k=100, using a min-heap (priority queue) or similar selection algorithm.

Part of PrimeIntellect/Terminal-Lego-15k.