自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 leetcode之子数组问题

一、最大和子数组问题——寻找子数组使得该子数组中元素的和最大【思路】    1、初始化left = 0, maxSum = 0, right = 0    2、计算nums[left, right]的元素和,若大于maxSum,则更新maxSum。另,若>0,则right++,表示继续向该子数组中添加元素,否则,另left= right +1 , right = left,表示当前子数组已经...

2018-04-14 10:01:53 370

原创 Leetcode之运算库函数自定义

一、Leetcode50——pow【注意点】   1、n的值可以为正,负,0   2、O(n)会TLE,使用递归时,一定要将中间步保存   3、有博文中提到,若n<0,可以令n=-n, x = 1/x,但需要对n取反后是否出界进行处理,以下代码可以避免这个问题【Python3代码】class Solution: def myPow(self,x,n): if n ==...

2018-04-13 20:20:33 1699

原创 Leetcode38 - Count And Say

Leetcode38 - count and say

2017-09-18 17:58:25 574

原创 leetcode36 - Valid Sudoku

leetcode 36 - valid sudoku

2017-09-04 12:09:54 366

原创 leetcode 31 - next permutation

LeetCode 31 - next permutation

2017-08-09 11:53:31 393

原创 LeetCode 30 - Substring with Concatenation of all words

LeetCode30 - Substring with concatenation of all words

2017-08-09 09:50:45 296

原创 LeetCode29 - divide two Integers

LeetCode29 - Divide Two Integer

2017-08-09 09:31:06 324

原创 LeetCode25 - reverse nodes in k groups

LeetCode25 - reverse nodes in k groups

2017-08-07 17:25:31 387

原创 LeetCode24 - swap nodes in pairs

LeetCode24 - swap nodes in pairs

2017-08-07 16:04:54 267

原创 LeetCode23 - merge k sorted lists

LeetNode 23 - merge k sorted lists

2017-08-07 15:23:42 354

原创 LeetCode20 - Valid parentheses

LeetCode 20 - Valid parentheses

2017-07-21 10:58:34 302

原创 LeetCode19 - remove nth node from end of list

LeetCode19 - remove nth node from end of list

2017-07-21 09:54:37 305

原创 LeetCode18 - 4Sum

LeetCode18 - 4Sum

2017-07-18 14:17:22 369

原创 LeetCode17 - letter combinations of a phone number

LeetCode17 - letter combinations of a phone number

2017-07-17 17:35:18 414

原创 LeetCode16 - 3Sum Closest

LeetCode16 - 3Sum closest

2017-07-16 13:40:24 360

原创 LeetCode15 - 3Sum

LeetCode15 - 3Sum

2017-07-14 10:56:03 353

原创 LeetCode14-Longest Common Prefix

LeetCode14 - Longest Common Prefix

2017-07-13 11:38:28 351

原创 LeetCode11-Container With Most Water

LeetCode11-Container with most water

2017-04-28 16:58:04 266

原创 IOS学习(1)— IOS默认工程结构

IOS学习(1) — IOS默认工程结构

2017-04-19 20:27:36 532

原创 从命令行程序学习Objective-C的类和函数

IOS开发基础

2017-04-19 19:15:45 833

原创 LeetCode10-Regular Expression Matching

LeetCode10-Regular Expression Matching

2017-04-18 16:04:27 519

原创 LeetCode9-Palindrome Number

LeetCode9-Palindrome Number

2017-04-18 10:01:28 310

原创 LeetCode8-StringtoInteger

LeetCode8-StringtoInteger

2017-04-17 19:10:43 374

原创 LeetCode7-Integer Reverse

LeetCode7-Integer Reverse

2017-04-17 16:11:36 270

原创 LeetCode6-ZigZag convert

LeetCode6-Zigzag

2017-04-17 15:11:01 359

原创 LeetCode5-Longest Palindromic Substring

LeetCode第5题:Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000

2017-04-17 11:18:07 292

空空如也

空空如也

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

TA关注的人

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