Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.31 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Find a single integer that occurs with even frequency in a given array of ints when all others occur odd with frequency
  2. for each number:
  3.   if it's not in the hash table, mark its spot in the table as 1.
  4.  
  5.   if it is in the hash table then:
  6.     if its value is '1', make it '2'
  7.     if its value is '2', make it '1'.