自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Magi Su的技术回收站

在虚构的故事当中寻求真实感的人脑袋一定有问题

  • 博客(7)
  • 收藏
  • 关注

原创 LeetCode题解:Construct the Rectangle

For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now is to design a rectangular web page, whose length L

2017-01-25 16:30:47 443

原创 LeetCode题解:Max Consecutive Ones

Given a binary array, find the maximum number of consecutive 1s in this array.Example 1:Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digits are consecutiv

2017-01-20 16:17:07 468

原创 LeetCode题解:Magical String

A magical string S consists of only '1' and '2' and obeys the following rules:The string S is magical because concatenating the number of contiguous occurrences of characters '1' and '2' generates

2017-01-20 16:11:56 752

原创 LeetCode题解:Reverse String

Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".思路:当然可以用双指针来做,不过最简单的还使用STL。题解:std::string reverseString(st

2017-01-17 16:37:56 441

原创 LeetCode题解:Hamming Distance

The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.思路:先通过异或得到

2017-01-17 16:33:44 462

原创 LeetCode题解: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 substring is "()",

2017-01-17 13:17:26 375

原创 LeetCode题解:Assign Cookies

Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which is the minimum size of a c

2017-01-02 14:25:31 548 1

空空如也

空空如也

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

TA关注的人

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