LintCode问题图解-32

本文准备讲解1个简单的算法编程问题, 这个算法编程问题来自LintCode平台。不了解.LintCode平台的读者可以阅读笔者文章(在线编程平台推荐-LeetCode)。问题的英文版本描述如下:

Sum

Find three.  The sum is the closest for a target. Return the sum .

Example

For example, [-1 2 1 -4], the target is1. 2. (-1 + 2 + 1 = 2).

Find three.  The sum is the closest for a target. Return the sum .

Example

For example, [-1 2 1 -4], the target is1. 2.(-1 + 2 + 1 = 2).

介绍1种简单高效的算法。


简单高效的算法
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容