
lintcode
文章平均质量分 57
想做程序媛的小太阳
这个作者很懒,什么都没留下…
展开
-
Lintcode 382:三角形计数
在Lintcode上并没有找到这道题目,但既然碰到了,就自己写一写。在别人的博客上copy一段原题描述。Description:给定一个整数数组,在该数组中,寻找三个数,分别代表三角形三条边的长度,问,可以寻找到多少组这样的三个数来组成三角形?Explanation:例如,给定数组 S = {3,4,6,7},返回 3其中我们可以找到的三个三角形为:{3,4,6} {3,6,7} {4,6,7} ...原创 2018-04-22 14:08:40 · 276 阅读 · 0 评论 -
Lintcode 366:Fibonacci 斐波那契数列
Find the Nth number in Fibonacci sequence. A Fibonacci sequence is defined as follow: The first two numbers are 0 and 1. The i th number is the sum of i-1 th number and i-2 th number. The first ten...原创 2018-08-13 11:28:36 · 170 阅读 · 0 评论