
c++
文章平均质量分 66
二次元中毒者
众多IT民工中的一员。爱好动漫,电影。闲的时候喜欢喝喝咖啡,看看书,散散步。新的开始,开始学着热爱C#,热爱码工的生活~ Life Pattern:coding-> read paper->coding->read paper---->
展开
-
LeetCode 对称树解法
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the f原创 2014-10-20 07:44:54 · 592 阅读 · 0 评论 -
Max Points on a line ,在二维平面寻找共线的最多点
LeetCode 上面的题目。原创 2014-10-13 19:42:45 · 741 阅读 · 0 评论 -
最后一个字的长度。
给定一个字符串,包含大小写英文字母,计算最右一个字的长度。原创 2014-10-14 14:04:49 · 643 阅读 · 0 评论 -
Binary Tree Level Order Traversal, 二叉树层级遍历
[LeetCode] Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree {3原创 2014-10-14 13:00:10 · 1221 阅读 · 0 评论 -
二叉树遍历算法,前序
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti原创 2014-10-14 13:27:00 · 384 阅读 · 0 评论 -
判断链表是否循环,找出循环点
判断链表是否循环,找出循环点。例子:原创 2014-10-19 02:32:15 · 640 阅读 · 0 评论 -
Leetcode, 组合序列生成
给定一个n和k,给出c_{n}^k的所有组合。一下是C++实现。原创 2014-10-20 18:43:38 · 703 阅读 · 0 评论