Domain Name Forum

Domain Name Forum (http://www.domainnameforum.org/index.php)
-   Computer Science (http://www.domainnameforum.org/forumdisplay.php?f=136)
-   -   An interesting problem that I heard from Jon Bentley (http://www.domainnameforum.org/showthread.php?t=107925)

webdev 07-09-2010 11:34 PM

An interesting problem that I heard from Jon Bentley
 
You are given a one-dimensional array of signed integers. Find the (contiguous) subarray with the largest sum. If none of the array elements are negative, the solution is obviously that the subarray is equal to the entire array, so the problem is interesting only if the integers are signed. ...


All times are GMT -4. The time now is 01:44 AM.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.