• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅
2014年6月11日
Leetcode: Longest Substring Without Repeating Characters
摘要: Use HashSet Use HashMap 阅读全文
posted @ 2014-06-11 03:24 neverlandly 阅读(364) 评论(0) 推荐(0)
Leetcode: ZigZag Conversion
摘要: 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 阅读(298) 评论(0) 推荐(0)
Leetcode: Letter Combinations of a Phone Number
摘要: 像这种DFS的题目,常见的写法无外乎两种,使用recursion, 或者用Stack。本文采用了Recursion的方式。做完后积累的经验有:像这种在一个ArrayList里面罗列可能的path的题目,recursion的参数一般包括:包含最终结果的集合(ArrayList),input(Strin 阅读全文
posted @ 2014-06-11 02:24 neverlandly 阅读(678) 评论(0) 推荐(0)
Summary: Depth-first Search(DFS)
摘要: 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 阅读(634) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3