Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding puzzle 3
Message
De
06/06/2002 06:33:53
Walter Meester
HoogkarspelPays-Bas
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00665235
Message ID:
00665328
Vues:
26
Hi Nadya,

Instead of relying on SQL, here a faster method.
CREATE CURSOR Invert (un I)
SELECT t1
nLow = 0
INDEX ON Un TAG un && Only neccesary when the order is not right yet
SCAN
	FOR nT = nLow+1 TO Un-1
		INSERT INTO Invert VALUES (nT)
	ENDFOR
	nLow=un
ENDSCAN
Walter,


>Hi everybody,
>
>Ok, I was inspired by Peter. Here is a very simple problem, but neverless, let's find out the most elegant solution.
>
>There is a table with some sequence unique numbers:
>
>1
>3
>4
>8
>15
>...
>
>No pattern. Your goal would be to find out all missing numbers (of course, only whole numbers).
>
>For more advanced, I would make the task more difficult: find out all missing simple (? oops, what's the correct math term?) numbers. The latest problem seems complicated and I don't know solution myself yet...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform