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:
00665456
Vues:
30
right, you are treating the ordered array like it is an ordered binary tree, which is okay for finding the max element. But without pointers and/or using some recursion, you'll have a very messy solution.

The problem is you want to find the first the element that is closest to X, but not greater then it. I think, it would do to simply linearly search, starting from the greatest element and then continue backwards until you find the element that meets this condition.

that's what i did. then you end that loop, and start another one.

matt
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform