November 2016

S M T W T F S
  1 2345
6789101112
13141516171819
20212223 242526
27282930   

Style Credit

Expand Cut Tags

No cut tags
Tuesday, August 15th, 2006 10:29 pm
Статья тут: http://xxx.lanl.gov/PS_cache/cs/pdf/0407/0407003.pdf.
Под катом цитата.
Success has its problems. While many technology companies are hemorrhaging money and employees, Google is flush with money and hiring vigorously. Google employees are cheerful and optimistic, with the exception of G—.

G— maintains the mailboxes at Google. The mailbox technology consist of trays arranged in linear order and bolted to the wall. The names on the mailboxes are alphabetized. G— is grumpy after each new hire because, to make room for the nth new employee, the names on O(n) mailboxes need to be shifted by one.

University graduate programs in the US have also been growing vigorously, accepting as students those talented employees downsized from high-tech companies.

At Stony Brook S—implements the mailbox protocol. Each time a new student arrives, S—makes room for the new student’s mailbox using the same technique as G—. However, S— only needs to shift names by one until a gap is reached, where the empty mailbox belonged to a student who graduated previously. Because the names have more or less random rank, S—does not need to shift many names before reaching a gap.

Both S— and G— are implementing INSERTION SORT. However, while S— is blissfully unaware that INSERTION SORT is an O(n2) algorithm, G— continually hopes that each new hire will be named Zhang, Zizmor, or Zyxt.