+ 2
Memory error and longer time to execute program
When I input letters (2-5) it takes less time, 7 letters takes around 57 seconds, don't have the patience to know how long 8-11 will take, but 12 upward, I'm getting memory error https://code.sololearn.com/c8vN4BI6EU56/?ref=app
6 Antworten
+ 7
Your speed troubles can be lessen if you use a set instead of a list to check if your words exist (your "merged" list).
Lines 28 and 53.
+ 5
You can use my github hosted word list if you want 😊
https://code.sololearn.com/cYWZw368gHYG/?ref=app
+ 3
Cépagrave changing the list to set worked , 7 letters doesn't take 57 seconds , it's not even up to 2 secs , tho anything more than 10 letters still spring memory error...thanks to everyone
+ 2
There is a CPU limit on SoloLearn Playground. Programs that hit it always get errors usually timelimit exceeded, but others are possible. The interaction between the app and the remote server running your code isn't perfect so even programs that do work correctly display memory error messages occasionally.
+ 1
A suggestion...to run here, that program needs a wordlist file.
~ Can you create a small wordlist as part of the program's startup, then read it in normally?
You won't be able to run very large scans here, but your problem appears to be exponential so even a few characters' range ought to be useful.
~ Some of us may be able to read the code for things like exploding permutations, but making it work here helps us practice connecting / testing what we think it's doing with what's happening :)
+ 1
Here's a code that imports its wordlist from a public repository, FYI:
https://code.sololearn.com/cUTx0iILpRhn/?ref=app