title: Sorting 1 million 8-decimal-digit numbers with 1 MB of RAM
body: <p>I have a computer with 1 MB of RAM and no other local storage. I must use it to accept 1 million 8-digit decimal numbers over a TCP connection, sort them, and then send the sorted list out over another TCP connection. </p>
  
  <p>The list of numbers may contain duplicates, which I must not discard. The code will be placed in ROM, so I need not subtract the size of my code from the 1&nbsp;MB. I already have code to drive the Ethernet port and handle TCP/IP connections, and it requires 2&nbsp;KB for its state data, including a 1&nbsp;KB buffer via which the code will read and write data. Is there a solution to this problem?</p>
  
  <p><strong>Sources Of Question And Answer:</strong></p>
  
  <p><a href="http://tech.slashdot.org/comments.pl?sid=232757&amp;cid=18925745" rel="noreferrer">slashdot.org</a></p>
  
  <p><a href="https://web.archive.org/web/20160309195130/http://nick.cleaton.net/ramsort.html" rel="noreferrer">cleaton.net</a></p>