摘要: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. backtracking a function to achieve backtrackin 阅读全文
posted @ 2018-09-22 15:01 elsie12 阅读(76) 评论(0) 推荐(0)
摘要: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to le 阅读全文
posted @ 2018-09-22 14:47 elsie12 阅读(73) 评论(0) 推荐(0)
摘要: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). cases: when stand on the 阅读全文
posted @ 2018-09-22 13:07 elsie12 阅读(80) 评论(0) 推荐(0)
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2018-09-20 23:56 elsie12 阅读(75) 评论(0) 推荐(0)