This website requires Javascript to function properly. Please go to the setting of your web browser and enable Javascript for this website.
×
Loading...
Close
Home
Share
我的理解是:
mustang
(mustang)
在给出的一组数中,找出这样一组数,这组数的特点是,每后一个数减其相临前一个数的差,都是相等,题目要求找到最长的那组数的长度。
例如: 1 2 6 7 11
结果可以是 1,2 (差是1) or 6,7 (差也是1), 上面那段代码会返回2。
(#9936770@0)
Last Updated: 2016-2-9
This post has been archived. It cannot be replied.
Share
Report
Replies, comments and Discussions:
一道面试题,大家给出出主意哈,我一点头绪都没有
枫下论坛主坛
/
工作学习
/
学科技术