Historically, we'd probably use an associative array or a hash table
to solve this problem in a traditional computing environment. The location
would be the key and the sales for that store, the
value. Then we'd process the input file one line at a
time, adding each store as a key. What problems do you
see with this approach? Say if you were running it on
one terabyte of data. Do you think that it flat out
won't work? Or could you run out of memory having to store
this hash table. Could it take an excessively long
time? Or will we not get the right answer?
歴史的には連想配列つまりハッシュテーブルが
この種の問題解決に使われます
店舗名がキー(Key)で
金額が値(Value)です
同じキーの値を加算していきます
この方法の問題点は何でしょう?
データ量が膨大な場合は 処理は不可能?
メモリが足りなくなる?
時間がかかる?
正しい結果が得られない?