depends on what you want to do imo
web dev at an average to good company? no absolutely not worth it
anything at a FAANG? +/- mandatory
anything that involves complex algorithms?(efficient delivery/dispatching system at scale, complex social media, complex games, anything where efficiency/speed/low memory usage is extremely important) probably yes
otherwise some basic algorithm solving is probably enough(I really enjoyed the algorithmic exercises on freecodecamp web path for example, I think it's just enough for about 80-90% of junior programming jobs)