Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Single occurrence in a string
Message
De
30/03/2015 12:45:41
 
 
À
30/03/2015 08:05:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01617326
Message ID:
01617428
Vues:
47
>- All gentleman code was based on brute force, on wich every iteration of the algorithm caused equal or more work in each step. In example, Tore's algorithm read all the info in a table and uses the SQL engine to order it, while Dragan's algorithm uses a variable on which in every iteration is bigger and the search of subtsr is longer
>
>- Your algorithm, on the opposite side, is strategy, and you keep reducing the source string a lot in each step, so the next iteration the search work is less every time.
>
>I was really amazed by your thinking on this question, and it is something te be learned.
>
>Thanks for the lesson :)

>
>LOL!!! My pleasure.
And of course when one argues the point of efficiency in terms of one's use of time... Posting the query here and leveraging the expertise of the folks who frequent this board (some who may still be actively still using VFP, thus not "rusty"), you'll come up with a rather nice solution. :grin:
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform