上一页 1 2 3 4 5 6 7 ··· 33 下一页
摘要: Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
posted @ 2017-02-28 06:18 Hygeia 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the postorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [3,2,1]. 牛解法:postorder就是L-R- 阅读全文
posted @ 2016-10-06 01:42 Hygeia 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [1,2,3]. Note: Recursive 阅读全文
posted @ 2016-10-06 01:39 Hygeia 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [1,3,2]. Note: Recursive s 阅读全文
posted @ 2016-10-06 01:35 Hygeia 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: Note: You may assume the 阅读全文
posted @ 2016-08-30 02:25 Hygeia 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 1、概念 回溯算法实际上一个类似枚举的搜索尝试过程,主要是在搜索尝试过程中寻找问题的解,当发现已不满足求解条件时,就“回溯”返回,尝试别的路径。 回溯法是一种选优搜索法,按选优条件向前搜索,以达到目标。但当探索到某一步时,发现原先选择并不优或达不到目标,就退回一步重新选择,这种走不通就退回再走的技术 阅读全文
posted @ 2016-08-27 01:17 Hygeia 阅读(4522) 评论(0) 推荐(1) 编辑
摘要: Given a singly linked list, return a random node's value from the linked list. Each node must have the same probability of being chosen. Follow up:Wha 阅读全文
posted @ 2016-08-26 03:11 Hygeia 阅读(234) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the 阅读全文
posted @ 2016-08-16 10:39 Hygeia 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assum 阅读全文
posted @ 2016-08-16 10:03 Hygeia 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Implement an iterator to flatten a 2d vector. For example,Given 2d vector = By calling next repeatedly until hasNext returns false, the order of eleme 阅读全文
posted @ 2016-08-16 07:27 Hygeia 阅读(224) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 33 下一页