### Leetcode

Leetcode

3 已关注
47篇博文
• #### Leetcode：19 Remove Nth Node From End of List（在链表中删除倒数第n个数）

Given a linked list, remove the nth node from the end of list and return its head.For example, Giv...

2017-12-13 11:28
71
• #### lettcode：540. Single Element in a Sorted Array(已排序数组中出现一次的数字，其他数字出现两次)

Given a sorted array consisting of only integers where every element appears twice except for one el...

2017-12-19 20:12
57
• #### Leetcode：191. Number of 1 Bits（返回一个数字对应二进制中1的个数）

Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also know...

2017-12-19 20:37
50
• #### Leetcode：48. Rotate Image（数组选择90度）

You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).No...

2017-12-12 19:03
162
• #### Leetcode：383.Ransom Note（统计每个字符串每个字母的个数）

Given an arbitrary ransom note string and another string containing letters from all the magazines, ...

2017-12-04 17:49
46
• #### Leetcode：453. Minimum Moves to Equal Array Elements

Given a non-empty integer array of size n, find the minimum number of moves required to make all arr...

2017-12-05 21:06
47
• #### Leetcode：219. Contains Duplicate II（数组是否含有重复元素）

Given an array of integers and an integer k, find out whether there are two distinct indices i and j...

2017-12-06 19:11
267
• #### Leetcode：454. 4Sum II （解决时间和空间复杂度是关键）

Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such t...

2017-12-06 20:18
298
• #### Leetcode：169. Majority Element（找到数组中出现次数最多的元素）

Given an array of size n, find the majority element. The majority element is the element that appear...

2017-12-04 11:46
185
• #### Leetcode：73.Set Matrix Zeroes

Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.public ...

2017-11-29 10:50
47
• #### Leetcode：728. Self Dividing Numbers（是否为分裂数字）

A self-dividing number is a number that is divisible by every digit it contains.For example, 128 is ...

2017-11-29 11:39
88
• #### Leetcode：263. Ugly Number（factors是否只包含2 3 5）

Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers ...

2017-11-29 12:07
65
• #### Leetcode： 217. Contains Duplicate（数组是否包含重复数字）

Given an array of integers, find if the array contains any duplicates. Your function should return t...

2017-12-03 20:49
270
• #### Leetcode：202. Happy Number

Write an algorithm to determine if a number is “happy”.A happy number is a number defined by the fol...

2017-11-27 10:27
63
• #### Leetcode：203 Remove Linked List Elements（删除链表中的某个元素））

Remove all elements from a linked list of integers that have value val.Example Given: 1 –> 2 –> 6 –...

2017-11-27 11:01
47
• #### Leetcode：204. Count Primes 求素数的优化问题

Description:Count the number of prime numbers less than a non-negative number, n.Credits: Special t...

2017-11-27 11:54
53
• #### Leetcode：205. Isomorphic Strings (同构字符串)

Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the charac...

2017-11-27 20:27
57
• #### Leetcode：713.Subarray Product Less Than K

题目描述： 题目：Your are given an array of positive integers nums.Count and print the number of (contiguou...

2017-11-04 11:00
250
• #### Leetcode：121. Best Time to Buy and Sell Stock

题目： Say you have an array for which the ith element is the price of a given stock on day i.If you w...

2017-11-05 11:41
67
• #### Leetcode：27.Remove Element

题目：Given an array and a value, remove all instances of that value in-place and return the new length...

2017-11-06 10:34
87