自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Leetcode-198. House Robber,213. House Robber II

题目:

2016-11-15 22:15:59 508

原创 Leetcode-403.Frog Jump(青蛙跳石头)

今天的题目是:Leetcode 403-青蛙跳A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a stone, but it must not jump into

2016-11-15 20:05:31 4288

原创 Leetcode-32. Longest Valid Parentheses

题目:Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid parentheses subs

2016-11-13 22:37:30 489

原创 Leetcode-264. Ugly Number II

题目:代码:版本1:class Solution1 {public: int nthUglyNumber(int n) { vectornum = {2,3,5}; vectorre; re.push_back(0); //少于6个数 for (int i = 0; i < 6; i++)re.push_back(1); if (n <= 6

2016-11-12 14:59:52 463

原创 Leetcode-279. Perfect Squares

今天广州天气有点冷,如下图:so,刷个题暖暖身吧!!看题:279. Perfect Squares QuestionEditorial Solution My SubmissionsTotal Accepted: 56296Total Submissions: 163333Difficulty: MediumCon

2016-11-10 16:40:39 646

原创 Leetcode-312. Burst Balloons

题目:312. Burst Balloons Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If t

2016-11-09 22:36:27 500

原创 双重二分查找的应用

前几天面试的时候遇到一个问题,给定n个ip地址和m个ip地址块,如何判断,这n个地址是否在这m个ip地址块中的任意一个中。后来想到了一个双重二分查找的方法,思路如下:以IPv4地址为例,一共32位,为了方便记忆采用点分10进制方法标识。其本质是32位无符号整形,每一位不是0就是1,这样用来标记2^32-1个不同的unsigned型整数,每一个数代表一个网络地址。所以,对于一个给定的

2016-11-06 20:39:16 934

原创 Leetcode-321. Create Maximum Number

题目:

2016-11-06 20:31:52 621

空空如也

空空如也

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

TA关注的人

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