OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it

Liste des GroupesRevenir à col advocacy 
Sujet : OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it
De : nospam (at) *nospam* dfs.com (DFS)
Groupes : comp.os.linux.advocacy
Date : 07. Mar 2024, 16:10:27
Autres entêtes
Message-ID : <65e9cad3$0$4689$882e4bbb@reader.netnews.com>
User-Agent : Betterbird (Windows)
Original sentence: "Jumble this sentence then put it back in order."
Simple coding requirements:
  has to be done in a loop
     parse the original sentence into words
     randomly jumble the words
     concatenate them with spaces to form a new sentence string
     print new sentence to screen
     parse the new sentence and restore it
     repeat
I haven't started yet, but I figure it's about 5-8 lines in python.  Too easy.  So it has to be written in C.
I'm the judge.
I'm looking for 3 winning entries (including mine):
1) the fastest
2) the best
3) the fewest lines
The best might be the simplest, or the shortest, or the most innovative use of C, etc.  It's subjective, but I'll explain why I chose the best.
Obviously, you can't use anyone else's submission for ideas or tips before submitting your own.
If you win all 3 categories, you're cola's King Of The Jumble.

Date Sujet#  Auteur
5 Oct 24 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal