码迷,mamicode.com
首页 >  
搜索关键字:two points    ( 13225个结果
Max Points on a line
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.思路:这道题主要是找出重叠结点和相同斜率之和。此时我们要判断有斜率和无斜率个数,并判断那个数量比较大,...
分类:其他好文   时间:2014-07-16 20:26:01    阅读次数:123
【leetcode刷题笔记】Max Points on a Line
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.题解:思路比较简单,每条直线都可以表示为y=kx+b,所以对于任意三点,如果它们共线,那么它们中任意两点的...
分类:其他好文   时间:2014-07-14 10:02:12    阅读次数:187
Just like normal variables,
Just like normal variables, pointers can be declared constant. There are two different ways that pointers and const can be intermixed, and they are very easy to mix up. To declare a const pointer, ...
分类:其他好文   时间:2014-07-12 21:20:23    阅读次数:165
Leetcode:Swap Nodes in Pairs 单链表相邻两节点逆置
Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant space. Y...
分类:其他好文   时间:2014-07-12 20:39:17    阅读次数:225
Add Binary
Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". public class Solution { public String addBinary(String a, String b) { ...
分类:其他好文   时间:2014-07-12 19:42:26    阅读次数:168
Java Word Ladder(字梯)
问题: Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Only one letter can be changed at a time Each intermediate wo...
分类:编程语言   时间:2014-07-12 19:21:38    阅读次数:290
poj 1753 Flip Game
Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 29865   Accepted: 12943 Description Flip game is played on a rectangular 4x4 field with two-sided p...
分类:其他好文   时间:2014-07-12 19:15:30    阅读次数:136
Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, whe...
分类:其他好文   时间:2014-07-12 19:06:27    阅读次数:204
HDU 1016 Prime Ring Problem 题解
Problem Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime...
分类:其他好文   时间:2014-07-12 16:42:15    阅读次数:271
数学图形(1.35)Kappa curve
不知道这个曲线和那个运动品牌背靠背有什么关系.阿迪原先的商标是个三叶草,难道背靠背也是由数学图形来的?以下是维基上的解释.In geometry, the kappa curve or Gutschoven's curve is a two-dimensional algebraic curve r...
分类:移动开发   时间:2014-07-12 15:00:42    阅读次数:324
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!