码迷,mamicode.com
首页 >  
搜索关键字:face the right way    ( 12368个结果
【leetcode】Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:其他好文   时间:2014-07-22 23:16:35    阅读次数:373
【HDOJ】1198 Farm Irrigation
其实就是并查集,写麻烦了,同样的代码第一次提交wa了,第二次就过了。 1 #include 2 #include 3 4 #define MAXNUM 55 5 #define UP 0 6 #define RIGHT 1 7 #define DOWN 2 8 #def...
分类:其他好文   时间:2014-07-22 23:13:53    阅读次数:310
[leetcode]Binary Tree Maximum Path Sum
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(...
分类:其他好文   时间:2014-07-22 23:07:34    阅读次数:312
Android Lock Pattern 图案解锁
参考链接:http://www.cnblogs.com/dyingbleed/archive/2012/12/03/2800007.html http://blog.csdn.net/way_ping_li/article/details/8925936
分类:移动开发   时间:2014-05-01 12:38:33    阅读次数:438
Visulalization Voronoi in OpenSceneGraph
Abstract. In mathematics a Voronoi diagram is a way of dividing space into a number of regions. A set of points, called seeds, sites, or generators is...
分类:其他好文   时间:2014-05-01 09:46:54    阅读次数:493
hdu 1233 还是畅通工程
简单最小生成树,继续我的kruskal#include#include#include#includeusing namespace std;const int MAX=1000000;struct node{ int left,right,cost;}road[MAX];bool cmp(n...
分类:其他好文   时间:2014-05-01 09:28:42    阅读次数:333
LeetCode:Rotate List
题目链接Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.首...
分类:其他好文   时间:2014-05-01 04:52:19    阅读次数:288
Data Abstraction
What is an object? (Page 238)In C++, an object is just a variable, and the purest definition is "a region of storage" (this is a more specific way ...
分类:其他好文   时间:2014-05-01 04:38:01    阅读次数:327
最大子数组和(最大子段和)
比如对于数组[1,-2,3,5,-1,2] 最大子数组和是sum[3,5,-1,2] = 9, 我们要求函数输出子数组和的最大值,并且返回子数组的左右边界(下面函数的left和right参数).本文我们规定当数组中所有数都小于0时,返回数组中最大的数(也可以规定返回0,只要让以下代码中maxsum初...
分类:其他好文   时间:2014-04-29 15:32:49    阅读次数:554
Leetcode:Minimum Path Sum 最小路径和
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at...
分类:其他好文   时间:2014-04-28 10:46:41    阅读次数:311
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!