Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coding puzzle (4)
Message
From
06/06/2002 11:54:23
 
 
To
06/06/2002 11:44:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00665368
Message ID:
00665522
Views:
14
Cetin:

>>>>>>>>>>
for ix=1 to alen(arrNums)-1
   if arrNums[ix]+arrNums[ix+1] = X
      ? ix,ix+1,arrNums[ix],arrNums[ix+1]
   endif
endfor
>>>>>>>>>>
This only works if the two numbers are adjacent in the array (which is not the case in general).

> Just chained to draw attention to my real world puzzle in troubleshooting
> section :)
I actually used the winning algorithm twice in production systems: (1) a portfolio management system for an insurance company, (2) a resource utilization system for a lumber company.

Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform