471,873 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,873 software developers and data experts.

Sorting words by ending

Dear all,

I need a code which sorts the words listed in a text file by ending. In other words, it works to find "rhyming" words in a text file. I need your help please! Thanks a lot!

Baris
Sep 8 '06 #1
1 4025
Banfa
9,065 Expert Mod 8TB
How about

load the file
reverse all the strings
sort these strings alphabetically
reverse all the strings again

print or save to file the list of words sorted by endings.

Note 2 words ending in the same letter don't necessarily rhyme and it is possible for 2 words with different eandings to rhyme (e.g. said, read)
Sep 8 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by silveira neto | last post: by
3 posts views Thread by Terry Richards | last post: by
2 posts views Thread by D. Roshani | last post: by
7 posts views Thread by Federico G. Babelis | last post: by
8 posts views Thread by D. Roshani | last post: by
3 posts views Thread by marc | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.