Welcome to the InterviewMitra

How long it would take to sort 1 trillion numbers?

1 Answer

0 votes
answered Oct 18, 2012 by anonymous

Merge Sort for sorting.

O(1,000,000,000,000 Log 1,000,000,000,000) - Average Case Scenario
O(1,000,000,000,000 Log 1,000,000,000,000) - Worst Case Scenario

I'd guess you can do 1 billion operations per second, thus 3000 seconds.

Welcome to InterviewMitra, which is a collaboratively edited interview question and answer site for professional and enthusiast programmers. It's 100% free.
...