自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(35)
  • 资源 (1)
  • 收藏
  • 关注

原创 【LeetCode】Letter Combinations of a Phone Number

Letter Combinations of a Phone Number Total Accepted: 4387 Total Submissions: 17627 My SubmissionsGiven a digit string, return all possible letter combinations that the number could represent.A ma

2014-01-25 16:11:44 2457

原创 【九度】题目1120:全排列 && 题目1369:字符串的排列

题目1120:全排列题目描述:给定一个由不同的小写字母组成的字符串,输出这个字符串的所有全排列。我们假设对于小写字母有'a' 输入:输入只有一行,是一个由不同的小写字母组成的字符串,已知字符串的长度在1到6之间。输出:输出这个字符串的所有排列方式,每行一个排列。要求字母序比较小的排列在前面。字母序如下定义:已知S = s1s2...sk , T = t1t2...t

2014-01-24 15:10:43 1561 1

原创 【LeetCode】Permutations && Permutations II

1、Permutations Total Accepted: 6396 Total Submissions: 20594 My SubmissionsGiven a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[

2014-01-24 14:34:58 2957

原创 【LeetCode】Next Permutation

Next Permutation Total Accepted: 4075 Total Submissions: 16219 My SubmissionsImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If

2014-01-24 12:53:59 1024

原创 【LeetCode】Valid Parentheses && Generate Parentheses && Longest Valid Parentheses

这三道题都是括号匹配问题。1、Valid Parentheses Total Accepted: 5225 Total Submissions: 18918 My SubmissionsGiven a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input s

2014-01-24 10:46:15 1254

原创 【九度】题目1342:寻找最长合法括号序列II(25分)

题目描述:假如给你一个由’(‘和’)’组成的一个随机的括号序列,当然,这个括号序列肯定不能保证是左右括号匹配的,所以给你的任务便是去掉其中的一些括号,使得剩下的括号序列能够左右括号匹配且长度最长,即最长的合法括号序列。输入:测试数据包括多个,每个测试数据只有一行,即一个随机的括号序列,该括号序列的长度保证不超过106。输出:对于每个测试案例,输出一个整数,表示最后剩下的最长合法

2014-01-24 10:39:30 2681

原创 【LeetCode】Remove Duplicates from Sorted List I && II

I、每个数据只允许出现1次Remove Duplicates from Sorted List Total Accepted: 7120 Total Submissions: 20880 My SubmissionsGiven a sorted linked list, delete all duplicates such that each element appear only onc

2014-01-22 16:26:04 881

原创 【LeetCode】Remove Duplicates from Sorted Array I && II

I、每个数据只允许出现1次Remove Duplicates from Sorted Array Total Accepted: 7116 Total Submissions: 21546 My SubmissionsGiven a sorted array, remove the duplicates in place such that each element appear only

2014-01-22 16:13:09 1052

原创 【LeetCode】Search a 2D Matrix && 【九度】题目1384:二维数组中的查找

Search a 2D Matrix Total Accepted: 4984 Total Submissions: 16715 My SubmissionsWrite an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:I

2014-01-22 10:12:57 1196

原创 【LeetCode】48 Rotate Image && 【九度】题目1164:旋转矩阵

Rotate Image Total Accepted: 4289 Total Submissions: 14183 My SubmissionsYou are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you d

2014-01-21 16:43:34 1342

原创 【LeetCode】Permutation Sequence

Permutation Sequence Total Accepted: 3033 Total Submissions: 14751 My SubmissionsThe set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in o

2014-01-17 13:48:25 2814

原创 【LeetCode】Populating Next Right Pointers in Each Node I & II

Populating Next Right Pointers in Each Node Total Accepted: 6122 Total Submissions: 17900 My SubmissionsGiven a binary tree    struct TreeLinkNode {      TreeLinkNode *left;      TreeLinkNode

2014-01-16 13:24:35 953

原创 【LeetCode】N-Queens II && 【九度】题目1254:N皇后问题

N-Queens II Total Accepted: 2737 Total Submissions: 10408 My SubmissionsFollow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.

2014-01-15 17:00:20 1191

原创 【LeetCode】N-Queens && 【九度】题目1140:八皇后

N-Queens Total Accepted: 3171 Total Submissions: 12620 My SubmissionsThe n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given

2014-01-15 16:55:31 1426

原创 【LeetCode】Binary Tree Zigzag Level Order Traversal

Binary Tree Zigzag Level Order Traversal Total Accepted: 3689 Total Submissions: 14306 My SubmissionsGiven a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left

2014-01-14 17:36:36 892

原创 【LeetCode】Palindrome Partitioning II

Palindrome Partitioning II Total Accepted: 3698 Total Submissions: 21952 My SubmissionsGiven a string s, partition s such that every substring of the partition is a palindrome.Return the minimum c

2014-01-14 14:47:24 1015

原创 【LeetCode】Palindrome Partitioning

Palindrome Partitioning Total Accepted: 4268 Total Submissions: 17532 My SubmissionsGiven a string s, partition s such that every substring of the partition is a palindrome.Return all possible pal

2014-01-14 14:21:50 1943 5

原创 时间转换工具/时间和13位毫秒转换软件

其实以前有个类似的exe,是别人写好的。但是用起来特别不方便,如果输入的时候时间格式不对,就自己退出了。凑活用了一段时间,觉得还是得动手写一个。用的是MFC写的。界面如下点击转换,可以自动填写当前时间,并转换为需要的格式。时间格式支持2014年1月14日12:38:03,2014-1-14 12:38:11,2014/3/14 12:38:03下载地址:http:/

2014-01-14 12:46:22 12499 2

转载 在Linux上安装Memcached服务

下载并安装Memcache服务器端服务器端主要是安装memcache服务器端.下载:http://www.danga.com/memcached/dist/memcached-1.2.2.tar.gz另外,Memcache用到了libevent这个库用于Socket的处理,所以还需要安装libevent,libevent的最新版本是libevent-1.3。(如果你的系统已经安装了li

2014-01-14 11:12:09 614

转载 【LeetCode】Palindrome Partitioning I&II

原文来自http://blog.csdn.net/yutianzuijin/article/details/16850031leetcodeDP深搜回文串目录(?)[+]Palindrome PartitioningPalindrome Partitioning II深搜DP1 Palindrome Partitioning问题来源:Pa

2014-01-13 17:53:45 771

原创 【LeetCode】Longest Palindromic Substring && 【九度】题目1528:最长回文子串(腾讯2013年实习生招聘二面面试题)

Longest Palindromic Substring Total Accepted: 4808 Total Submissions: 23151 My SubmissionsGiven a string S, find the longest palindromic substring in S. You may assume that the maximum length of S i

2014-01-12 22:41:55 929

原创 【LeetCode】Binary Tree Level Order Traversal II

Binary Tree Level Order Traversal II Total Accepted: 4229 Total Submissions: 13624 My SubmissionsGiven a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left

2014-01-12 22:27:41 888

原创 【九度】题目1523:从上往下打印二叉树

题目描述:从上往下打印出二叉树的每个节点,同层节点从左至右打印。输入:输入可能包含多个测试样例,输入以EOF结束。对于每个测试案例,输入的第一行一个整数n(1Ci=’d’表示第i个节点有两子孩子,紧接着是左孩子编号和右孩子编号。Ci=’l’表示第i个节点有一个左孩子,紧接着是左孩子的编号。Ci=’r’表示第i个节点有一个右孩子,紧接着是右孩子的编号。Ci=’z’表示

2014-01-10 14:04:52 842

原创 【LeetCode】Binary Tree Level Order Traversal

Binary Tree Level Order Traversal Total Accepted: 5091 Total Submissions: 16977 My SubmissionsGiven a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, lev

2014-01-10 13:26:34 948

原创 【LeetCode】First Missing Positive

First Missing Positive Total Accepted: 3893 Total Submissions: 18419 My SubmissionsGiven an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,a

2014-01-09 22:53:21 742

原创 【LeetCode】Path Sum II

Path Sum II Total Accepted: 4441 Total Submissions: 16502 My SubmissionsGiven a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given th

2014-01-08 15:42:41 1355

原创 【LeetCode】Path Sum

Path Sum Total Accepted: 5082 Total Submissions: 17224 My SubmissionsGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path eq

2014-01-08 14:10:19 1042

原创 【LeetCode】Sum Root to Leaf Numbers

Sum Root to Leaf Numbers Total Accepted: 4893 Total Submissions: 17365 My SubmissionsGiven a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example

2014-01-08 00:02:59 716

原创 【LeetCode】Valid Palindrome

Valid Palindrome Total Accepted: 4526 Total Submissions: 21149 My SubmissionsGiven a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For exampl

2014-01-07 23:05:43 728

转载 加州求职记

原文来源于http://blog.liancheng.info/job-hunting-in-california/#.UswIcUb6Aud一年多前,出于显而易见的原因,下定决心肉身翻墙。经过一番考虑,放弃了读书这条途径,决定直接找工作,通过H1B签证出去。于是去年八月份从百度辞职,开始着手准备。当时觉得今年拿到H1B的成功率大致能有个六七成,加上周围朋友们的不断鼓励,可以说还是相当自信的。

2014-01-07 22:14:17 1109

原创 【LeetCode】Longest Common Prefix

Longest Common Prefix Total Accepted: 4226 Total Submissions: 15745 My SubmissionsWrite a function to find the longest common prefix string amongst an array of strings.最直接的办法就是循环数组,依次迭代求最长前缀。不过这样会

2014-01-07 09:08:53 715

转载 【LeetCode】题目难度以及相关算法

转载自:LeetCode Question Difficulty DistributionIDQuestionDiffFreqData StructureAlgorithms

2014-01-06 17:35:17 1171

原创 【LeetCode】Multiply Strings

Multiply Strings Total Accepted: 2611 Total Submissions: 13742 My SubmissionsGiven two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arb

2014-01-06 13:32:44 719

原创 【LeetCode】Plus One && 【九度】题目1198:a+b

Plus One Total Accepted: 4206 Total Submissions: 14127 My SubmissionsGiven a number represented as an array of digits, plus one to the number.题目意思为给定一个数组,这个数组内的数代表某个大数,也就是可能为100位甚至多少位的一个数。例如1234

2014-01-03 13:56:10 1854

原创 【LeetCode】Longest Consecutive Sequence

Longest Consecutive Sequence Total Accepted: 4076 Total Submissions: 15654 My SubmissionsGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For examp

2014-01-02 13:16:25 664

时间转换工具

将时间转换为13位毫秒,例如2014-01-14 12:43:20转为13位毫秒是1389674600000,同时也支持将1389674600000转换为2014-01-14 12:43:20

2014-01-14

空空如也

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

TA关注的人

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