I usually don’t like to be the one who brings you bad news, but if that’s how you really are then I’m sorry you won’t land a job any time soon, or if you do get lucky and land one you’ll get yourself and probably your employer in a lot of trouble, I have 6 years experience in programming in general, and I had/still have people like you in my life, and it’s the most annoying thing ever, they expect you to always give them the right answer and if you get it wrong they’ll get mad and blame you, I’m usually a lot more positive than this but I’m sorry this field might not be for you.
but if you really want to improve then I would probably recommend hackerone and codewars, it really helped me a lot, also you should do problem solving on your phone like I still do to this day, play chess, binary puzzles, and generally logic puzzles it’ll improve your memory and your abilities to solve various problems in life, it might be boring at first but you’ll get used to it, and also make a daily routine for yourself as this will help clear your mind a lot, DON’T DRINK COFFEE, coffee will have an opposite effect if you consume it daily, drink juice or even better
drink water while coding to stay hydrated.
and seriously this will actually help you a lot, and also you need to build self confidence and have a strong personality or when you work in teams you will suffer, and you also need to have a very positive attitude or risk getting fired or worse get yourself into useless rants and arguments online.
and you need to read the documentation, read the documentation of the technology you’re using as much as you can, download it on your phone and read it in your free time, I’m not saying memorize it, I’m just saying you should know where to exactly look if you get stuck,
and also you need to learn how to use google to your advantage, I can guarantee you that google has probably saved countless programmers from getting fired or worse asking that one arrogant friend who laughs at you every time you ask him to help you out.
it really helps a lot to minimize time loss and increase the time you spend on problem solving and programming.
and also FCC forum is really good, you shouldn’t be ashamed to ask your questions here, people here are awesome, probably the best programming forum out there.