leetCode 试题分析与解答

29 已关注
33篇博文
• Leetcode 第 794 题(Valid Tic-Tac-Toe State）

Leetcode 第 794 题(Valid Tic-Tac-Toe State） A Tic-Tac-Toe board is given as a string array board. ...

2018-03-17 19:23
490
• LeetCode 第 73 题 (Set Matrix Zeroes)

LeetCode 第 73 题 (Set Matrix Zeroes) Given a m x n matrix, if an element is 0, set its entire row a...

2016-07-13 19:29
2316
• LeetCode 第 367 题 (Valid Perfect Square)

LeetCode 第 367 题 (Valid Perfect Square) Given a positive integer num, write a function which retur...

2016-07-12 20:29
2205
• LeetCode 第 372 题 (Super Pow)

LeetCode 第 72 题 (Super Pow) Your task is to calculate ab mod 1337 where a is a positive integer an...

2016-07-12 21:02
2692
• LeetCode 第 19 题 (Remove Nth Node From End of List)

LeetCode 第 19 题 (Remove Nth Node From End of List) Given a linked list, remove the nth node from t...

2016-07-07 22:33
1823
• LeetCode 第 292 题 （Nim Game）

LeetCode 第 292 题 （Nim Game） You are playing the following Nim Game with your friend: There is a he...

2016-07-05 13:58
1437
• LeetCode 第 67 题 (Add Binary)

LeetCode 第 67 题 (Add Binary) Given two binary strings, return their sum (also a binary string). ...

2016-07-03 13:21
2613
• LeetCode 第 204 题 (Count Primes)

LeetCode 第 204 题 (Count Primes) Description: Count the number of prime numbers less than a non-...

2016-07-01 12:37
1776
• LeetCode 第 371 题 （Sum of Two Integers）

LeetCode 第 371 题 （Sum of Two Integers） Calculate the sum of two integers a and b, but you are not ...

2016-07-01 19:56
4739
• LeetCode 第 263 题 （Ugly Number）

LeetCode 第 263 题 （Ugly Number） Write a program to check whether a given number is an ugly number. ...

2016-07-02 09:08
2417
• LeetCode 第 155 题 (Min Stack)

LeetCode 第 155 题 (Min Stack) Design a stack that supports push, pop, top, and retrieving the minim...

2016-05-03 14:47
3179
• LeetCode 第 344 题(Reverse String)

LeetCode 第 344 题(Reverse String) Write a function that takes a string as input and returns the str...

2016-05-01 19:29
2879
• LeetCode 第 345 题(Reverse Vowels of a String)

LeetCode 第 345 题(Reverse Vowels of a String) Write a function that takes a string as input and rev...

2016-05-01 19:28
2782
• LeetCode 第 14 题(Longest Common Prefix)

LeetCode 第 14 题(Longest Common Prefix) Write a function to find the longest common prefix string a...

2016-05-01 19:26
1573
• LeetCode 第 21 题 (Merge Two Sorted Lists)

LeetCode 第 21 题 (Merge Two Sorted Lists) Merge two sorted linked lists and return it as a new list...

2016-05-01 19:24
1334
• LeetCode 第 66 题 (Plus One)

LeetCode 第 66 题 (Plus One) Given a non-negative number represented as an array of digits, plus one...

2016-05-01 19:21
1435
• LeetCode 第 65 题(Valid Number)

LeetCode 第 65 题(Valid Number) Validate if a given string is numeric. Some examples: “0” =>...

2016-05-01 19:18
1402
• LeetCode 第 69 题 (Sqrt(x))

LeetCode 第 69 题 (Sqrt(x)) Implement int sqrt(int x). Compute and return the square root of x. 求...

2016-04-23 18:02
2493
• LeetCode 第 50 题 (Pow(x, n))

LeetCode 第 50 题 (Pow(x, n)) Implement pow(x, n). 这个题目非常简短，求 xnx^n。其中nn 为整数。 最简单的想法就是用一个循环，将 xx 自乘...

2016-04-23 17:42
2672
• LeetCode 第 343 题 (Integer Break)

LeetCode 第 343 题 (Integer Break) Given a positive integer n, break it into the sum of at least tw...

2016-04-20 09:48
6633