1
私は技術的なインタビューで、「配列の中に重複を見つける」という質問があり、問題なくハッシュテーブルを使ってO(n)時間を解決した後、フォローアップの質問をしました。アレイエクステンションの質問で重複を見つけるにはどうすればいいですか?
Orig: Determine if an array contains duplicate entries.
F1: Now what if the array is very large, and had to be distributed across multiple machines.
F2: What if the network connection between these machines are prone to failure?
F3: What if the hardware themselves are not 100% reliable and may occasionally give off wrong answers?
F4: Design a system so that multiple simultaneous users may need to update this array, while you need to maintain uniqueness of its entries.
私はF1について考え、その後、巨大なハッシュテーブルを使用するのが賢明ではないでしょうし、我々はO(1)メモリを補うためにO(n²)にランタイムをトレードすることができると言いましたが、わかりませんでした残り。どんな助け?