刷题
PickUpOldDriver
皮卡老司机
展开
-
Leetcode--1.Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same el...原创 2018-04-04 02:11:17 · 191 阅读 · 0 评论 -
Leetcode 821. Shortest Distance to a Character, 欢迎各位前来讨论
Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string.Example 1: Note:S string length is in [1, 10000].C is a single ch...原创 2018-05-13 08:35:20 · 295 阅读 · 0 评论 -
349. Intersection of Two Arrays
#求两个数组的交集这个题目在真实的面试里面遇到过 当年还不懂HashMap的巧妙用法主要思路就是利用了Hashmap 里面key不可以重复的这个特性;欢迎各位进行讨论;public int[] intersection(int[] nums1, int[] nums2) { HashMap<Integer,Integer> hs=new HashMap<Integ...原创 2018-05-16 07:56:40 · 123 阅读 · 0 评论