- 博客(19)
- 资源 (2)
- 收藏
- 关注
原创 Leetcode Flatten Binary Tree to Linked List
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened tree should look like: 1
2014-02-28 23:59:27 2207
原创 Leetcode Decode Ways 解题报告
A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the total numb
2014-02-25 23:06:03 18657
原创 Leetcode Distinct Subsequences 解题报告
Leetcode Distinct Subsequences 解题报告只可以用删除字符的方法从第一个字符串变换到第二个字符串,求出一共有多少种变换方法。http://oj.leetcode.com/problems/distinct-subsequences/
2014-02-23 21:51:17 11831 1
原创 LeetCode Word Break II 解题报告
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example, givens = "cats
2014-02-18 22:39:53 2278 2
原创 Leetcode Word Ladder II 解题报告
http://oj.leetcode.com/problems/word-ladder-ii/Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be c
2014-02-16 22:40:21 11668 3
原创 Leetcode Surrounded Regions 解题报告
http://oj.leetcode.com/problems/surrounded-regions/Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'.A region is captured by flipping all 'O's into 'X's in that surrou
2014-02-15 20:57:18 5523 1
原创 LeetCode Word Ladder解题报告
Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter can be changed at a timeEach intermediate word m
2014-02-14 23:24:18 5061
原创 Linux 常用Shell面试题(一)
Linux下面开发,Shell命令也是面试时候经常问到的问题。本专题中涉及到的都是比较需要组合多个命令才能完成的命令。一,替换当前某个目录下所有文件中的:www.sina.com.cn为sina.com.cn这道题至少有4个知识点1,你需要知道替换使用sed2,你需要知道如何遍历当前目录下的所有文件3,你需要如何对每个找到的文件应用sed4,你需要知道sed默认替换的时
2014-02-13 13:04:39 3575 1
原创 Leetcode Insertion Sort List 解题报告
http://oj.leetcode.com/problems/insertion-sort-list/Sort a linked list using insertion sort.基本分析:用插入排序对一个链表进行排序。一开始写的时候想套用数组的插入排序,结果发现无法对末节点加上NULL。对链表进行插入排序的正确方法是:新建一个头节点,遍历原来的链表,在新链表中找到适合的位
2014-02-11 09:23:37 6539 2
原创 Leetcode Jump Game II 解题报告
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Your goal is to
2014-02-09 15:37:38 2161
原创 Leetcode Jump Game 解题报告
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine if yo
2014-02-08 18:08:28 3647
原创 LeetCode Word Break 解题报告
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, givens = "leetcode",dict = ["leet",
2014-02-08 17:39:22 3775 1
原创 LeetCode Sort List 解题报告
Sort a linked list in O(n log n) time using constant space complexity.http://oj.leetcode.com/problems/sort-list/解题报告:就是对一个链表进行归并排序。找到链表的middle节点,然后递归对前半部分和后半部分分别进行归并排序,最后再进行Merge。/** * De
2014-02-08 15:31:49 9754 6
原创 LeetCode Binary Tree Maximum Path Sum 解题报告
返回树中任意两点路径的最大值,只要两点间有路径可以到达就算。
2014-02-06 22:43:45 12011 2
原创 C++面试题(三)——STL相关各种问题
C++面试题——STL相关各种问题唐璐http://blog.csdn.net/worldwindjp/STL相关的各种问题1,用过那些容器。2,vector,list,deque的实现。3,hashmap和map有什么区别。4,map是怎么实现的?
2014-02-03 15:53:57 16047
原创 C++面试题(一)——基础概念篇
C++面试题——基础概念篇普通C++面试时候的一般都是这个套路: 1,C++和C相比最大的特点 1)面向对象:封装,继承,多态。 2)引入引用代替指针。 3)const /inline/template解决宏常量。 4)na
2014-02-03 13:06:10 8851 2
原创 Leetcode Pow(x, n) 解题报告
http://oj.leetcode.com/problems/powx-n/求出x的n次方。x是double类型,n是整数类型。分析:这道题有几个知识点:1,n分别为负数,0,正数的情况。n为负数的话,算出结果之后要被1除,同时还要考虑这时候x不能为0。n为0的时候返回值为1,但0的0次方是无意义的,应该抛出异常。2,TLE如果直接计算的话,数据一大就超时,考虑计算技巧。
2014-02-02 21:21:29 1283
原创 Leetcode Climbing Stairs 解题报告
题目参见: http://oj.leetcode.com/problems/climbing-stairs/You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can
2014-02-02 21:07:54 1743
基于CRF的中文地名识别研究.pdf
2014-02-04
统计学习方法
2014-01-28
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人