Ad
  • Default User Avatar

    I would recommend reading about optimisation generally. Its not a topic i could simply give a magic solution for. Especially not without seeing your code. Memoisation may be helpful, you could look into that.

    If that doesnt work, try asking chatgpt about general optimisation and keep feeding it more information about your code until it tells you something you can work with. Try not to just straight up ask for an answer though, thats cheating - just ask what directions you could look into.

  • Default User Avatar

    My JS code has passed the 'HEY JUDE' test, but when I press attempt it says timeout(took more than 12s). I have ran it several times on my computer, even tried online js compilers. It's running almost instantly everywhere. What should I do? I know my code does need some optimization, but I have got no clue where to even start.