摘要:
Use HashSet Use HashMap 阅读全文
posted @ 2014-06-11 03:24
neverlandly
阅读(357)
评论(0)
推荐(0)
摘要:
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font ... 阅读全文
posted @ 2014-06-11 03:12
neverlandly
阅读(294)
评论(0)
推荐(0)
摘要:
像这种DFS的题目,常见的写法无外乎两种,使用recursion, 或者用Stack。本文采用了Recursion的方式。做完后积累的经验有:像这种在一个ArrayList里面罗列可能的path的题目,recursion的参数一般包括:包含最终结果的集合(ArrayList),input(Strin 阅读全文
posted @ 2014-06-11 02:24
neverlandly
阅读(671)
评论(0)
推荐(0)
摘要:
There are generally two methods to write DFS algorithm, one is using recursion, another one is using stack. (reference from Wiki Pedia)Pseudocode for ... 阅读全文
posted @ 2014-06-11 02:09
neverlandly
阅读(627)
评论(0)
推荐(0)