07 2017 档案

摘要:题目: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums exc 阅读全文
posted @ 2017-07-25 20:06 panini 阅读(235) 评论(0) 推荐(0)
摘要:题目: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ B 阅读全文
posted @ 2017-07-25 19:44 panini 阅读(276) 评论(0) 推荐(0)
摘要:题目: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1) space 阅读全文
posted @ 2017-07-25 10:59 panini 阅读(222) 评论(0) 推荐(0)
摘要:题目: Given a sorted integer array without duplicates, return the summary of its ranges. For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"]. 链 阅读全文
posted @ 2017-07-25 10:19 panini 阅读(263) 评论(0) 推荐(0)
摘要:题目: Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, -, *, / operato 阅读全文
posted @ 2017-07-24 11:01 panini 阅读(337) 评论(0) 推荐(0)
摘要:Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top right corner as s 阅读全文
posted @ 2017-07-20 19:34 panini 阅读(213) 评论(0) 推荐(0)
摘要:题目: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia:In a complete binary tree every level 阅读全文
posted @ 2017-07-20 11:06 panini 阅读(230) 评论(0) 推荐(0)
摘要:题目: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the following 阅读全文
posted @ 2017-07-20 10:21 panini 阅读(242) 评论(0) 推荐(0)
摘要:题目: Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums 阅读全文
posted @ 2017-07-18 11:00 panini 阅读(374) 评论(0) 推荐(0)
摘要:题目: Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should 阅读全文
posted @ 2017-07-17 11:12 panini 阅读(282) 评论(0) 推荐(0)
摘要:题目: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. For 阅读全文
posted @ 2017-07-17 07:23 panini 阅读(157) 评论(0) 推荐(0)
摘要:题目: Note: This is an extension of House Robber. After robbing those houses on that street, the thief has found himself a new place for his thievery so 阅读全文
posted @ 2017-07-17 06:55 panini 阅读(158) 评论(0) 推荐(0)
摘要:题目: Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containi 阅读全文
posted @ 2017-07-15 11:43 panini 阅读(185) 评论(0) 推荐(0)
摘要:题目: Implement a trie with insert, search, and startsWith methods. 链接: http://leetcode.com/problems/implement-trie-prefix-tree/ 7/14/201760%,照着课件代码改写的。 阅读全文
posted @ 2017-07-15 08:00 panini 阅读(174) 评论(0) 推荐(0)
摘要:题目: There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you ha 阅读全文
posted @ 2017-07-15 00:50 panini 阅读(183) 评论(0) 推荐(0)
摘要:Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2017-07-06 02:09 panini 阅读(133) 评论(0) 推荐(0)
摘要:自己的理解,更全面的需要额外查。 class可以implements Comprable interface,此class也必须有compareTo method,Comparable必须作用在compatible的数据上,否则compareTo会throw ClassCastException。C 阅读全文
posted @ 2017-07-04 19:55 panini 阅读(157) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-07-01 07:33 panini 阅读(0) 评论(0) 推荐(0)