title: Disk Search / Sort Algorithm
body: <p>Given a Range of numbers say 1 to 10,000, Input is in random order. 
  Constraint: 
  At any point only 1000 numbers can be loaded to memory.</p>
  
  <p>Assumption:
  Assuming unique numbers. </p>
  
  <p>I propose the following efficient , "When-Required-sort Algorithm".</p>
  
  <p>We write the numbers into files which are designated to hold particular range of numbers. For example, File1 will have 0 - 999 , File2 will have 1000 - 1999 and so on in random order.</p>
  
  <p>If a particular number which is say "2535" is being searched for then we know that the number is in the file3 (Binary search over range to find the file). Then file3 is loaded to memory and sorted using say Quick sort (which is optimized to add insertion sort when the array size is small ) and then we search the number in this sorted array using Binary search. And when search is done we write back the sorted file.</p>
  
  <p>So in long run all the numbers will be sorted.</p>
  
  <p>Please comment on this proposal.</p>