自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 资源 (1)
  • 问答 (5)
  • 收藏
  • 关注

原创 Implement strStr()

题目描述:https://leetcode-cn.com/problems/implement-strstr/思路:字符串匹配,在源字串中找到和目标字串开头字母相等的位置,再依次向后比较,如果剩余的字母也相同,则返回该位置。就否则继续向后重复该操作,直到源字串完。#include<cstdio>#include<iostream> #include<...

2019-01-24 18:11:28 190

原创 Letter Case Permutation

题目描述:https://leetcode-cn.com/problems/letter-case-permutation/思路:将字符串的转化看作一个二叉树的遍历(如下图),但要注意一点,在数字节点上,不能进行分支,否则会产生重复的情况。                                                            #include&lt...

2019-01-14 21:16:23 211

原创 Reverse Integer

题目描述:https://leetcode-cn.com/problems/reverse-integer/思路:从原数中分离出各个位的数值,并且倒置即可。#include<cstdio>#include<iostream>#include<math.h>#include<stdlib.h>using namespace std...

2019-01-14 16:48:04 93

原创 Binary Watch

题目描述:https://leetcode-cn.com/problems/binary-watch/题目过长,就不多描述了,直接点链接即可。思路:列举m个小时灯亮,n个分钟灯亮的情况下的各种小时和分钟的值,并且排列组合即可。(m+n==num)#include<cstdio>#include<iostream>#include<vector&g...

2019-01-13 22:09:06 190

原创 Two Sum

题目描述:Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the...

2019-01-13 16:17:21 123

空空如也

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

TA关注的人

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