
hashMap
文章平均质量分 78
chuandalishuo
这个作者很懒,什么都没留下…
展开
-
217, 219,220. Contains Duplicate I, II, III
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element原创 2016-10-27 01:40:41 · 302 阅读 · 0 评论 -
205. Isomorphic Strings
Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with anot原创 2016-10-21 09:13:03 · 163 阅读 · 0 评论 -
30. Substring with Concatenation of All Words
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and原创 2016-11-01 15:15:46 · 178 阅读 · 0 评论 -
207,210. Course Schedule I, II
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 have to first take course 1, which is expressed as原创 2016-10-21 16:16:21 · 282 阅读 · 0 评论 -
325. Maximum Size Subarray Sum Equals k
题目Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn't one, return 0 instead.Example 1:Given nums = [1, -1, 5, -2, 3], k = 3,return 4.原创 2016-12-04 08:45:51 · 234 阅读 · 0 评论 -
314. Binary Tree Vertical Order Traversal
题目:Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column).If two nodes are in the same row and column, the order should be fr原创 2016-12-04 08:59:10 · 234 阅读 · 0 评论 -
146. LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be positive) of the key if原创 2016-12-09 14:04:33 · 245 阅读 · 0 评论