subject
Computers and Technology, 19.02.2021 17:00 jboii11

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〈Integer>. Note that 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 the memory limit you are allowed for this problem so be careful about what data structures (if any) you use. 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 2 MB (where MB = 106 bytes) of memory. Note that it may not use any other storage: files, hard drive, network, etc.) Be sure to examine the handout on writing proper pseudocode for this course. 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). You may not use other data structures. Explain why your solution is under the 2 MB limit.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 16:50, Tyrant4life
Consider a slotted aloha system, where the time slot equals the fixed duration of each packet. assume that there are 4 stations a, b,c, d sharing the medium. (a) stations a, b,c, d receive one packet each from higher layers at times 1.3, 1.5, 2.6,5.7 respectively. show which transmissions take place when, according to the slottedaloha protocol; describe all transmissions until all four packets have been successful. when needed, each station has access to the following sequence of random number, provided by a random number generator and drawn uniformly between 0 and 1: (1) station a draws numbers: 0.31, 0.27, 0.78, 0.9, 0.9, 0.11, 0. (2) station b draws numbers: 0.45, 0.28, 0.11, 0.83, 0.37, 0.22, 0. (3)station c draws numbers: 0.1, 0.2, 0.3, 0.4, 0. (4) station d draws numbers: 0.36, 0.77, 0.9, 0.1, 0.1, 0.1, 0.1, 0. (b) in slotted aloha, a station transmits in each time slot with a given probability. what probabilities would you assign to each of the four stations so as to: (i) maximize the efficiency of the protocol? (ii) maximize fairness among the four stations? (c) will the efficiency increase or decrease if we modify slotted aloha as follows: (i) get rid of slots and allow stations to transmit immediately? (ii) implement carrier sensing? (iii) implement collision detection? (iv) implement collision avoidance?
Answers: 3
image
Computers and Technology, 22.06.2019 17:30, babyface1686
How do you make a lenny face? plz, brailiest to who can answer first.
Answers: 1
image
Computers and Technology, 23.06.2019 08:00, Buddy01
Match the items with their respective descriptions.
Answers: 1
image
Computers and Technology, 24.06.2019 06:00, bzhsh8282
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
You know the right answer?
The input to this problem consists of a sequence of 7-digit phone numbers written as simple integers...

Questions in other subjects:

Konu
History, 15.11.2019 23:31
Konu
Mathematics, 15.11.2019 23:31