Tony's Log

Algorithms, Distributed System, Machine Learning

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

My first try was very close to a final solution .. however, this is a much neater solution:

https://discuss.leetcode.com/topic/69436/concise-c-o-1-solution-using-3-hash-maps-with-explanation

Lesson learnt: data structure is crucial. And, if some logic is getting too complex, there must be sth wrong.

posted on 2017-02-12 15:22  Tonix  阅读(98)  评论(0编辑  收藏  举报