The input to this problem consists of a sequence of 7-digit phone numbers written as simple integers (e.g. 5551202 represents the phone number 555-1202). The sequence is provided via an Iterator - you do not get an array containing these phone numbers and you cannot go through the iterator more than once. The sequence is potentially too large to fit in memory so don't try to store the phone numbers themselves in an array. No phone number appears in the input more than once. You may assume that phone numbers will not start with 0, although they may contain zeroes otherwise.
Write precise pseudocode for a method that prints out the phone numbers (as integers) in the list in ascending order. Your solution must not use more than 2MB of memory. (Note: It cannot use any other storage - hard drive, network, etc.) In your pseudocode you may only declare variables and arrays of these unsigned data types (these are not real Java data types): bit(1 bit), byte(8 bits), short(16 bits), int(32 bits), long(64 bits). Explain why your solution is under the 2MB limit