abc_begin

导航

2017年9月17日 #

661. Image Smoother【easy】

摘要: 661. Image Smoother【easy】 Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of 阅读全文

posted @ 2017-09-17 23:31 LastBattle 阅读(290) 评论(0) 推荐(0)

27. Remove Element【easy】

摘要: 27. Remove Element【easy】 Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra spac 阅读全文

posted @ 2017-09-17 22:47 LastBattle 阅读(257) 评论(0) 推荐(0)

26. Remove Duplicates from Sorted Array【easy】

摘要: 26. Remove Duplicates from Sorted Array【easy】 Given a sorted array, remove the duplicates in place such that each element appear only once and return 阅读全文

posted @ 2017-09-17 22:31 LastBattle 阅读(144) 评论(0) 推荐(0)

88. Merge Sorted Array【easy】

摘要: 88. Merge Sorted Array【easy】 Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that num 阅读全文

posted @ 2017-09-17 22:12 LastBattle 阅读(171) 评论(0) 推荐(0)

605. Can Place Flowers【easy】

摘要: 605. Can Place Flowers【easy】 Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be pla 阅读全文

posted @ 2017-09-17 19:35 LastBattle 阅读(199) 评论(0) 推荐(0)

485. Max Consecutive Ones【easy】

摘要: 485. Max Consecutive Ones【easy】 Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 阅读全文

posted @ 2017-09-17 18:49 LastBattle 阅读(121) 评论(0) 推荐(0)

448. Find All Numbers Disappeared in an Array【easy】

摘要: 448. Find All Numbers Disappeared in an Array【easy】 Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and 阅读全文

posted @ 2017-09-17 18:30 LastBattle 阅读(177) 评论(0) 推荐(0)

1. Two Sum【easy】

摘要: 1. Two Sum【easy】 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 in 阅读全文

posted @ 2017-09-17 16:36 LastBattle 阅读(143) 评论(0) 推荐(0)

189. Rotate Array【easy】

摘要: 189. Rotate Array【easy】 Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated 阅读全文

posted @ 2017-09-17 16:21 LastBattle 阅读(170) 评论(0) 推荐(0)

redis源码学习_字典

摘要: redis中字典有以下要点: (1)它就是一个键值对,对于hash冲突的处理采用了头插法的链式存储来解决。 (2)对rehash,扩展就是取第一个大于等于used * 2的2 ^ n的数作为新的hash表大小;缩紧就是取第一个大于等于used的2 ^ n的数作为新的hash表大小。后面会介绍到dic 阅读全文

posted @ 2017-09-17 13:50 LastBattle 阅读(500) 评论(0) 推荐(0)