Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding puzzle (4)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00665368
Message ID:
00665609
Vues:
31
>Bingo! Your solution is correct with one exception. I did not specify the >array must contain two numbers that sum to X. Changing your do while to >include an additional condition to check min_index < max_index - and >returning a no match exists if ever false - solves the problem.

actually, as I decrement max_index by 1 or increment min_index by 1, the case you talk about, I cover by the last else if.
else if min_index = max_index
     return "Failure!"
endif
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform