码迷,mamicode.com
首页 >  
搜索关键字:two points    ( 13225个结果
[leetcode] Same Tree
Given two binary trees, write a function to check if they are equal or not.
分类:其他好文   时间:2014-07-03 19:26:46    阅读次数:213
LeetCode:Same Tree
Same Tree Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally i...
分类:其他好文   时间:2014-07-02 17:56:50    阅读次数:205
[leetcode] Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit.
分类:其他好文   时间:2014-07-02 14:47:43    阅读次数:253
poj 3090 Visible Lattice Points 法雷级数||打表
由于图像关于对角线对称,所以我们只看下三角区域。将x轴看做分母,被圈的点看成分子 依次是{1/2},{1/3,1/2},{1/4,3/4},{1/5,2/5,3/5,4/5} 写成前缀和的形式就是 {1/2},{1/2,1/3,2/3},{1/2,1/3,1/3,1/4,3/4},{1/2,1/3,1/3,1/4,3/4,1/5,2/5,3/5,4/5} 发现,这就是一个法雷级数,即第k项增...
分类:其他好文   时间:2014-07-02 11:41:03    阅读次数:137
[leetcode] Scramble String
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
分类:其他好文   时间:2014-07-02 10:03:09    阅读次数:175
【OC语法快览】二、存取方法
Accessors 存取方法 All instance variables are private in Objective-C by default, so you should use accessors to get and set values in most cases. There are two syntaxes. This is the traditional 1.x syntax: OC中所有的实例变量默认是私有的,所以多数情况下你应该使用访问器来获得和设置实例变量的值。访问器有...
分类:其他好文   时间:2014-07-02 08:39:04    阅读次数:231
计算几何-hdoj-1221-Rectangle and Circle
Rectangle and Circle   Problem Description Given a rectangle and a circle in the coordinate system(two edges of the rectangle are parallel with the X-axis, and the other two are parallel with the Y...
分类:其他好文   时间:2014-07-02 07:29:06    阅读次数:268
Leetcode:Merge Two Sorted Lists 合并两个有序单链表
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 代码如下: * Definition for singly-linked list. * struct L...
分类:其他好文   时间:2014-07-02 07:23:59    阅读次数:159
UVA 12714 Two Points Revisited(简单数学题)
UVA 12714 Two Points Revisited(简单数学题)...
分类:其他好文   时间:2014-07-02 06:54:53    阅读次数:154
LeetCode: Max Points on a Line [149]
【题目】 Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 【题意】 给定一堆点,要求找出一条之前上的最大点数 【思路】 没什么好的方法,从每个点P出发,遍历所有的情况 从每个点P出发,斜率相同的点即为统一之前上的点 注意两种特殊情况: 1. 两个点重合(即为同一个点) ...
分类:其他好文   时间:2014-07-02 06:52:06    阅读次数:171
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!