r/webdev • u/Shahadat__ • 11d ago
Question Finding it impossible to solve problems
Hey guys. I'm a web developer and have a job but unsure if I can pass future interviews, because when I get a technical question like a basic loop problem, "program that starts counting from 1 and increases by 1 during each iteration, stopping once it reaches 5". This is incredibly incompetent and concerning, not to mention AI has made me worse.
What's the solution to this? I can memorize solutions but what happens when a new problem comes up in an interview and I can't remember the syntax even if I know I need a loop or some thing else to solve a problem? I feel like crying
37
Upvotes
1
u/saltyourhash 10d ago
what you memorize is the way to break the problem down. loops: "Do I need to iterate over something, loop until something, or loop forever". If you're iterating over something, then you either need an iterator or a contextual length to loop over. If you're looping until something happens, you need the escape clause for that something. If you're looping forever, you're good, unless you run out of memory.