05 2016 档案

摘要:Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. Subscribe to s 阅读全文
posted @ 2016-05-30 08:19 新一代的天皇巨星 阅读(179) 评论(0) 推荐(0)
摘要:Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2016-05-30 07:52 新一代的天皇巨星 阅读(107) 评论(0) 推荐(0)
摘要:1. How to create generic array List<Integer>[] array = new List[len]; import java.lang.reflect.Array; ArrayList<Integer>[] array = (ArrayList<Integer> 阅读全文
posted @ 2016-05-29 14:59 新一代的天皇巨星 阅读(151) 评论(0) 推荐(0)
摘要:17. Letter Combinations of a Phone Number Given a digit string, return all possible letter combinations that the number could represent. A mapping of 阅读全文
posted @ 2016-05-25 13:22 新一代的天皇巨星 阅读(217) 评论(0) 推荐(0)
摘要:46. Permutations Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations:[1,2,3] 阅读全文
posted @ 2016-05-10 13:43 新一代的天皇巨星 阅读(262) 评论(0) 推荐(0)
摘要:284. Peeking Iterator Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the pe 阅读全文
posted @ 2016-05-08 14:25 新一代的天皇巨星 阅读(185) 评论(0) 推荐(0)
摘要:136. Single Number Given an array of integers, every element appears twice except for one. Find that single one. Your algorithm should have a linear r 阅读全文
posted @ 2016-05-08 13:26 新一代的天皇巨星 阅读(189) 评论(0) 推荐(0)
摘要:286. Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example, 阅读全文
posted @ 2016-05-08 13:18 新一代的天皇巨星 阅读(198) 评论(0) 推荐(0)
摘要:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum 阅读全文
posted @ 2016-05-06 13:02 新一代的天皇巨星 阅读(163) 评论(0) 推荐(0)
摘要:Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文
posted @ 2016-05-02 13:17 新一代的天皇巨星 阅读(163) 评论(0) 推荐(0)
摘要:2. Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their node 阅读全文
posted @ 2016-05-01 13:05 新一代的天皇巨星 阅读(216) 评论(0) 推荐(0)