【问题】
Given n points
on a 2D plane, find the maximum number of points that lie on the same straight line.
【思路】
对每一个点,分别计算这个点和其他所有点构成的斜率,具有相同斜率最多的点所构成的直线,就是具有最多点的直线。
【代码】
class Point:
def __in...
分类:
编程语言 时间:
2014-06-25 19:34:29
阅读次数:
246
团队建设总结fx O622
大的title 2
建设团队文化 2
办公环境(3s+树+湖)
3
每人一个办公室 3
弹性工作制 3
重大的决定公投体制 3
每年一个kid经验日 3
做自己想到做的事.. 3
One2one 3
灵活的规定 3
公共的gucywe 4
感谢队友的工作 4
欣赏队友的工作,不要挑刺,在完美的工作也有缺点..only find ...
分类:
其他好文 时间:
2014-06-24 23:55:50
阅读次数:
523
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using e...
分类:
其他好文 时间:
2014-06-24 23:30:08
阅读次数:
278
1.Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in you
r Gemfile
2.ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/local/lib/ruby/gems/1.9.1 director.y
3.rails 3遇到 Could n...
分类:
其他好文 时间:
2014-06-24 22:18:45
阅读次数:
316
//父页面调用子页面Add函数$("iframe").contentWindow.Add()//父页面对子页面Id为Sava的Dom元素执行一次单击操作$("iframe").contents().find("#Sava").click();//子页面调用父页面Update()函数parent.Up...
分类:
Web程序 时间:
2014-06-24 21:36:54
阅读次数:
172
【题目】
Given a binary tree, find the maximum path sum.
The path may start and end at any node in the tree.
For example:
Given the below binary tree,
1
/ 2 3
Return 6.
【题意】
给定一棵二叉树,找出其中路径和最大的路径,然会返回最大路径和。
本题中的路径不是从根节点到叶子节点这样的传统的路...
分类:
其他好文 时间:
2014-06-24 20:42:59
阅读次数:
268
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:
其他好文 时间:
2014-06-24 18:56:54
阅读次数:
240
解决方法如下 On the Windows 7 machine:Run secpol.mscDrill down through Local Policies | Security Options.Find Network Security: LAN Manager authentication l...
The world is beautiful. Even if you’re full of tears and sadness, open your eyes. Do what you want to do. Be what you want to be. Find friends. Don’t....
分类:
其他好文 时间:
2014-06-24 14:47:06
阅读次数:
295
JS正则表达式获取分组内容。支持多次匹配的方式:var testStr = "now test001 test002"; var re = /test(\d+)/ig; var r = ""; while(r = re.exec(testStr)) { alert(r[0] + " " + r[1]...
分类:
Web程序 时间:
2014-06-24 11:27:32
阅读次数:
220