上一页 1 2 3 4 5 6 7 8 ··· 13 下一页
摘要: https://leetcode.com/problems/binary-search-tree-iterator/ Implement an iterator over a binary search tree (BST). Your iterator will be initialized wi 阅读全文
posted @ 2016-02-26 22:40 流白 阅读(161) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/substring-with-concatenation-of-all-words/ You are given a string, s, and a list of words, words, that are all of the sa 阅读全文
posted @ 2016-02-25 06:04 流白 阅读(179) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/maximum-product-of-word-lengths/ Given a string array words, find the maximum value of length(word[i]) * length(word[j]) 阅读全文
posted @ 2016-02-20 05:17 流白 阅读(277) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/anagrams/ Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "b 阅读全文
posted @ 2016-02-20 02:17 流白 阅读(250) 评论(0) 推荐(0) 编辑
摘要: The trivial way, O(m + n): Merge both arrays and the k-th smallest element could be accessed directly. Merging would require extra space of O(m+n). Th 阅读全文
posted @ 2016-02-08 01:59 流白 阅读(1015) 评论(0) 推荐(0) 编辑
摘要: public static int[] max_min(int[] a){ //res[0] records the minimum value while res[1] records the maximal one. int res[] = new int[2]; int n = a.lengt 阅读全文
posted @ 2016-02-07 04:27 流白 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 一道来自jhu algorithm的作业题: Given two sorted arrays A, B, give a linear time algorithm that finds two entries i,j such that|A[i]−B[j]|is minimized. Prove th 阅读全文
posted @ 2016-02-05 01:12 流白 阅读(215) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/different-ways-to-add-parentheses/ Given a string of numbers and operators, return all possible results from computing a 阅读全文
posted @ 2016-02-03 08:29 流白 阅读(149) 评论(0) 推荐(0) 编辑
摘要: package dataStructure; import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; import java.io.*; cl 阅读全文
posted @ 2016-01-24 08:32 流白 阅读(505) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/longest-increasing-path-in-a-matrix/Given an integer matrix, find the length of the longest increasing path.From each ce... 阅读全文
posted @ 2016-01-20 22:48 流白 阅读(1393) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 13 下一页