Some tasks are dependent on tasks that follows later

Back to General discussions forum

qwerty     2025-03-28 05:45:51

For example, task #70 "Most frequent word" is dependent on task #72 "Funny words generator", but task #72 follows later in the list.

Nothing terribly bad, but I would like to solve dependencies first, then solve tasks that require these dependencies.

qwerty     2025-03-28 10:17:29

Program for task #72 "Funny words generator" works in a blink of eye, but for #70 "Most frequent word" takes around 20 seconds... does that mean my algorithm is too ineffective?

Both programs are in Python.

zelevin     2025-03-28 14:22:12

Cannot comment on your code (since it's not uploaded), but one would expect that generating 1M words would take longer than generating twenty. But, yes, 20 seconds sounds a bit on the long side. My code runs in under 4s on thirteen-year-old hardware.

qwerty     2025-03-28 17:27:32

Okay, understood! Will think on improvements. Maybe store seed values instead of actual words...

Please login and solve 5 problems to be able to post at forum