Leetcode
文章平均质量分 81
hello_qingwen
涙の雨が頬をたたくびに美しく
展开
-
leetcode difficulty and frequency distribution chart
Here is a difficulty and frequency distribution chart for each problem (which I got from the Internet and is very useful).Dynamic ProgrammingEdit DistanceMaximum SubarrayMinimum Path SumUniq转载 2014-05-13 20:51:20 · 935 阅读 · 0 评论 -
Leetcode中一维数组与应用I
一维数组虽然是最基础的数据结构,但是题目技巧性qu原创 2014-05-22 16:54:37 · 547 阅读 · 0 评论 -
Leetcode中几道链表题
继数组之后,Linklist算是第二基础的数据结构吧,写代码的时候思路清晰就好原创 2014-05-24 17:33:23 · 523 阅读 · 0 评论 -
Leetcode中括号题
想到括号问题,我最熟悉的是用stack来判断一个括号序列是否w原创 2014-05-20 21:08:03 · 479 阅读 · 0 评论 -
Leetcode中二叉树的遍历
二叉树的遍历,不管是recursive版的还是iterative版的,应该都是原创 2014-05-23 10:37:55 · 532 阅读 · 0 评论 -
Leetcode中字符串与子串 I
求子串应该也是字符串题目的一大分支吧。原创 2014-05-21 17:53:37 · 820 阅读 · 0 评论 -
Leetcode中回文题
这篇文章专门看Leetcode中回文的题目,原创 2014-05-20 20:21:44 · 564 阅读 · 0 评论 -
Leetcode中字符串与模式匹配II
模式匹配也算是字符串中比较难得题目了吧,动不动就是TLE。原创 2014-05-21 14:41:29 · 608 阅读 · 0 评论 -
Leetcode中的二分算法
Leetcode中有很多衍变的二叉查找算法原创 2014-05-24 00:11:32 · 510 阅读 · 0 评论 -
Leetcode中几道二叉树题 III
三、树的层次/序列化题目六:Populating Next Right Pointers in Each NodeGiven a binary tree, populating each next pointer to pointer to its right node. If there is no next right node, the next pointer should be原创 2014-05-25 19:46:24 · 445 阅读 · 0 评论 -
Leetcode中的intervals
题目一:Merge IntervalsGiven a collection of intervals, merge all overlapping inter原创 2014-05-25 20:40:49 · 495 阅读 · 0 评论 -
Leetcode中疯狂的matrix
题目一:s原创 2014-05-25 21:11:09 · 587 阅读 · 0 评论 -
Leetcode中几道二叉树题 (IV)
四、树上的路径和原创 2014-05-25 22:43:32 · 470 阅读 · 0 评论 -
Leetcode中几道二叉树题 II
三、平衡二叉树 (Balanced Binary Tree)题目九:Balanced Binary TreeGiven a binary tree, determine if it is height-balanced. For this problem, a height-balanced tree is defined as a binary tree in which the dep原创 2014-05-25 19:44:27 · 450 阅读 · 0 评论 -
Leetcode中一维数组与应用II
一、最大序列题目一:Gas StationThere are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with unlimited gas tank and it cost cost[i] of gas to travel f原创 2014-05-22 21:25:27 · 483 阅读 · 0 评论 -
Leetcode中的大整数
大整数的运算基本就是对数组ji原创 2014-05-22 23:08:50 · 871 阅读 · 0 评论 -
Leetcode之递归之苦
自从2014年某月某日学会了利用递归进行枚举sui原创 2014-04-20 21:05:16 · 474 阅读 · 0 评论 -
Leetcode数独
一道穷举法求数独的算法 http://oj.leetcode.com/problems/sudoku-solver/原创 2014-04-19 20:52:46 · 477 阅读 · 0 评论 -
递归之我见
最近递归看多了,貌似也看出花样了,今天来分门别类的k原创 2014-04-21 00:59:18 · 430 阅读 · 0 评论 -
(程序员)面试题的构成和分类
首先声明一下,这里的面试题主要所指数据结构和算法的题目,题目的分析集中在Leetcode上面的题目上。转载 2014-04-27 22:22:13 · 614 阅读 · 0 评论 -
Binary search and its variation
1. IntroductionWriting correct programs is not an easytask, especially for some problems that require particularly careful code, likebinary search. Knuth points out that while the first binary sea转载 2014-04-27 13:47:32 · 554 阅读 · 0 评论 -
Leetcode中判断数字
今天,我“又”做的一道题,要是面试中遇到,铁定要跪。为啥?因为这完全是一道没有算法的题目嘛,考细心,考细节,考各种层出不穷的情况的处理。下面原创 2014-04-20 16:27:24 · 459 阅读 · 0 评论 -
Leetcode中的错误列表
总结下自己遇到的leetcode错误(持续更新):1. 忘记给返回返回值!2.原创 2014-04-19 21:00:30 · 2906 阅读 · 0 评论 -
纪念一下C++ 11中的to_string()
今天发现C++推出了一个非常y原创 2014-04-21 10:30:29 · 1881 阅读 · 0 评论 -
Leetcode中的几何问题
几何问题的解法也没什么固定模式题目一:原创 2014-05-20 16:03:31 · 800 阅读 · 0 评论 -
Leetcode中字符串与break(一)
字符串一直以来都是我不擅长处理的题目,解题思路原创 2014-05-19 23:18:59 · 448 阅读 · 0 评论 -
Leetcode中两个字符串匹配
字符串的匹配问题很多得依靠DP原创 2014-05-21 13:41:47 · 1103 阅读 · 0 评论 -
Leetcode中一维数组与xSum
本来这应该是一道题目的,很简单的一道。题目:输入一个递增排序的数组和一个数字s,在数组中查找两个数,是的他们的和正好是s。如果有多对数字的和为s,输出任意一对即可。解析:线性遍历数组一遍就行。但是不是我们通常意义上的利用一个index++从头走到尾,这里需要借助额外的一index,两个index合作完成。bool findNumberEqualSum(int *a, int len,原创 2014-04-01 12:30:39 · 511 阅读 · 0 评论 -
Leetcode中图的遍历
Leetcode中有两道题涉及到图的遍历,原创 2014-05-19 21:36:53 · 1300 阅读 · 0 评论 -
Leetcode中几道二叉树题 I
二叉树的题很多,但是大多都能用递归的方法解决。一、有序数组或链表转换成BST题目一:Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to height balanced BST原创 2014-05-25 19:24:44 · 548 阅读 · 0 评论