Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding puzzle (4)
Message
De
06/06/2002 11:44:43
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/06/2002 08:39:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00665368
Message ID:
00665510
Vues:
19
>For those who know about asymptotic behavior:
>
>Given an array of increasing numbers and a number X, create a linear algorithm that finds whether the array contains two numbers that sum to X (and those two numbers if they exist).
>
>Daniel

for ix=1 to alen(arrNums)-1
if arrNums[ix]+arrNums[ix+1] = X
? ix,ix+1,arrNums[ix],arrNums[ix+1]
endif
endfor

Just chained to draw attention to my real world puzzle in troubleshooting section :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform