自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 leetcode13题解

leetcode 13. Roman to Integer题目Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999. 题目要求把罗马数字化为整数。解题思路首先要了解罗马数字的规则,见下图: 更多内容可以参考wiki了解了规则以后,我们再

2017-07-12 23:49:34 564 1

原创 leetcode217题解

leetcode 217. Contains Duplicate题目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

2017-07-12 21:59:54 357 2

原创 leetcode242题解

leetcode 242. Valid Anagram题目Given two strings s and t, write a function to determine if t is an anagram of s.For example, s = “anagram”, t = “nagaram”, return true. s = “rat”, t = “car”, return fals

2017-07-10 17:11:43 757

原创 leetcode237题解

leetcode 237. Delete Node in a Linked List题目Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and

2017-07-10 15:01:32 1401 1

原创 leetcode169题解

leetcode 169. Majority Element题目Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty

2017-07-10 11:14:08 369

原创 leetcode387题解

leetcode 387. First Unique Character in a String题目Given a string, find the first non-repeating character in it and return it’s index. If it doesn’t exist, return -1. Examples:s = "leetcode"return 0.

2017-06-24 15:02:22 366

原创 leetcode171题解

leetcode 171. Excel Sheet Column Number

2017-06-06 20:39:16 897

原创 leetcode122题解

leetcode 122. Best Time to Buy and Sell Stock II题目Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete

2017-06-05 18:18:50 1153

原创 leetcode283题解

leetcode 283.Move Zeroes题目Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements. For example, given nums = [0, 1, 0, 3, 1

2017-06-05 00:18:00 306

原创 leetcode371题解

leetcode 371.Sum of Two Integers题目Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example: Given a = 1 and b = 2, return 3. 题目意思是:在不使用+和-运算的情况下,求两个整数的和。

2017-06-04 19:52:44 221

原创 leetcode104题解

leetcode 104.Maximum Depth of Binary Tree题目Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.

2017-06-04 13:22:53 701

原创 leetcode136题解

leetcode 136.Single Number题目Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you imple

2017-06-02 20:25:47 400

原创 leetcode344题解

leetcode344. Reverse String题目Write a function that takes a string as input and returns the string reversed.Example: Given s = “hello”, return “olleh”. 翻译成中文就是反转一个字符串,给的例子很好理解。解题思路这道题很简单,关键是时间复杂度和空间复杂

2017-05-28 21:44:22 301

原创 leetcode412题解

leetcode 412.Fizz Buzz题解

2017-05-25 12:43:47 405 2

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除