Python Forum
Anagram Solver with Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anagram Solver with Python
#3
(May-28-2021, 07:14 PM)perfringo Wrote: No, I personally don't like it. Not at all. Algorithm is just brute force. Creating list of all permutations????

>>> len(list(permutations(list('abrakadabra'))))
39916800
Yes, almost forty million. On any machine it will take considerable time and memory. Try to do it with longest word in common use incomprehensibilities and you'll see....

I strongly suggest not to share it with anybody. Instead rewrite the code using better algorithm.

So, where do I get suggestions on how to make it better. I don't call myself an expert and I am always willing to learn better ways to improve my code and algorithms. I am open to any suggestions if you have any...
Reply


Messages In This Thread
Anagram Solver with Python - by BlazingWarlord - May-28-2021, 02:23 PM
RE: Anagram Solver with Python - by perfringo - May-28-2021, 07:14 PM
RE: Anagram Solver with Python - by BlazingWarlord - May-29-2021, 04:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Profit on Pricing Solver Gamo 0 1,716 Jul-17-2020, 07:35 AM
Last Post: Gamo
  anagram check with bitwise itaybardugo 1 2,525 May-28-2019, 09:22 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020