自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (2)
  • 收藏
  • 关注

原创 Leetcode-258-Add Digits

题目要求: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. 给定一个非负的整型数,重复加其每位,知道结果是一位数。 例:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. S

2016-09-28 13:11:37 331

原创 Leetcode-371-Sum of Two Intergers

题目要求:Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. 求两个整型数的和,但是不可使用+和-运算符 例:Given a = 1 and b = 2, return 3. 解题思路:1.既然不能使用“+”“-”运算符,就考虑位运算 2.例如13+1,

2016-09-22 16:37:11 319

原创 Leetcode-292-Nim Game

题目要求:You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be

2016-09-20 10:35:37 352

原创 Leetcode-350-Intersection of Two Arrays II

题目要求:Given two arrays, write a function to compute their intersection.求两个数组的并集例:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].注意:所求得的数组中有重复元素。解题思路:1,函数compare():将输入的两个数组按升序排列

2016-09-18 15:09:33 278

原创 Leetcode-349-Intersection of Two Array

题目要求:Given two arrays, write a function to compute their intersection.求两个数组的并集例:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].注意:所取得的并集中的元素无重复元素解题思路:1.分别将两个数组中的重复元素剔除  2.求两个数组

2016-08-25 09:57:02 289

原创 Leetcode-345-Reverse Vowels of a String

题目要求:Write a function that takes a string as input and reverse only the vowels of a string写一个函数具备以下功能:仅仅反转字符串中的元音字母(元音字母:a、e、i、o、u、A、E、I、O、U)例:Given s = "hello", return "holle"   Given s = "leet

2016-08-23 21:10:05 357

原创 Leetcode-344-Reverse String

倒序输出已知String

2016-08-22 21:51:49 237

空空如也

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

TA关注的人

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