自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

原创 [LeetCode] Maximal Rectangle

Maximal Rectangle  Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area....

2015-03-31 22:03:38 531 0

原创 [LeetCode] Valid Number

Valid Number Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" =>...

2015-03-31 13:57:52 659 0

原创 js 正则表达式

验证js字符串str是否满足正则表达式: 1 /\{[^\}]*?\}/g.test(str); 获得字符串str中的所有匹配: 1 var matched = str.match(/\{[^\}]*?\}/g); 上述中返回的是...

2015-03-31 10:17:07 449 0

原创 [LeetCode] Median of Two Sorted Arrays

Median of Two Sorted Arrays There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall r...

2015-03-30 14:37:29 778 0

原创 [LeetCode] Spiral Matrix

Spiral Matrix Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, Given th...

2015-03-29 16:23:04 779 0

原创 [LeetCode]Compare Version Numbers

Compare Version Numbers Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 version2 return -1, ...

2015-03-29 12:13:11 788 0

原创 [LeetCode]Find Minimum in Rotated Sorted Array

Find Minimum in Rotated Sorted Array Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might be...

2015-03-29 11:14:57 585 0

原创 Restore IP Addresses

Restore IP Addresses Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: ...

2015-03-28 21:49:34 570 0

原创 [LeetCode] Candy

Candy   There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected t...

2015-03-28 16:57:17 600 0

原创 [LeetCode] Decode Ways

Decode Ways A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 ...

2015-03-28 14:24:31 741 0

原创 [LeetCode] Maximum Gap

Maximum Gap Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linea...

2015-03-26 17:39:26 746 0

原创 [LeetCode] Divide Two Integers

Divide Two Integers Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 解题...

2015-03-26 14:20:09 654 0

原创 [LeetCode] Longest Common Prefix

Longest Common Prefix   Write a function to find the longest common prefix string amongst an array of strings. 解题思路: 注意string类的append和push_back...

2015-03-25 15:26:26 696 0

原创 [LeetCode] Sort Colors

Sort Colors Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with t...

2015-03-25 14:21:01 637 0

原创 [LeetCode] Fraction to Recurring Decimal

Fraction to Recurring Decimal Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. ...

2015-03-24 20:46:58 797 0

原创 [LeetCode OJ] Two Sum

Two Sum Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return ind...

2015-03-24 15:58:15 649 0

转载 动态库,静态库,动态链接,静态链接

静态库和动态库 目前以lib后缀的库有两种,一种为静态链接库(Static Link Library),另一种为动态连接库(Dynamic Link Library DLL)的导入库(Import Libary)。 在静态库情况下,函数和数据被编译进一个二进制文件(通常扩展名为*....

2015-03-22 22:37:48 729 0

原创 二叉树的广义表形式

一棵二叉树的广义表形式为: A ( B ( C ) , D ( E ( F , G ) , H ( , I ) ) )其图形为:

2015-03-22 21:36:11 1034 0

转载 C/C++基本数据类型长度

熟知基本数据类型是我们正确表达实际问题中各种数据的前提,因此我分类总结了一下C/C++/Windows /C#基本数据类型,以便日后查阅。          ANSI C/C++基本数据类型: Type Size 数值范围 ...

2015-03-22 20:53:40 697 0

原创 好办法牢记前缀++(--)与后缀++(--)执行顺序

前缀++(--)和后缀++(--)引无数程序员竞折腰。虽然实际项目中由于程序员的自我修养,不会对++或--写出让人晦涩难懂的代码,但是在面试笔试的时候,一些“无聊的”企业总会拿这个来刁难我们。例如对于下面一个题目: int a = 4; //分别执行以下五种情况 (1) a += a++; //a...

2015-03-16 12:43:44 1206 0

转载 JQuery判断数组中是否包含某个元素$.inArray("js", arr);

var arr = [ "xml", "html", "css", "js" ]; $.inArray("js", arr); //返回 3, 如果不包含在数组中,则返回 -1;

2015-03-06 13:02:32 566 0

原创 C# 实现eval,支持任意个数、任意基本类型的参数

js中有一个方法eval,能够随时执行用户编写的代码。 例如:js中的代码: eval("alert('hello world');"); 将会弹出一个写有hello world的提示框。 但C#中却没有对应的方法。 Google了一下,网...

2015-03-03 16:46:45 2762 0

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