what have you been using to practice your coding? I've haven't coded since graduation really..
I can't recommend you mine because it's in Japanese. I suggest you just look up
competitive programming challenges for your own languages. Personally I use C++.
Stuff I attempt are pathfinding, writing algorithms that has recursion, breadth-first, depth-first search to find solutions that is impossible for a human to do.
It will be hard when you initially start, but once you start you will figure out many shortcuts and you will not repeat mistakes you make the previous time. Basically your brain has to be tuned.
And yes I've encountered such questions in my interview, and they are usually very impressed when I solved it so fast, partly because I did the same questions online beforehand and knew what libraries, algorithms to use.
Unrelated, but my job hunt is shortened greatly because this website I use to search for programming jobs in Japan, they allow you to do coding challenges to raise your rank and prove your worth.
It's like a game, you start from rank D to the highest rank S. Raising your rank basically unlocks you job interviews.
Employers can set a minimum rank for someone to apply for a job.
On that website, rank D,C,B questions are basically 10 min solutions, only rank A, S questions requires you to think. I achieved rank S in three days.
Because of that site, you always get the first round interview, because you have already passed the screening.
It's so good I wonder if there's a english equivalent of such services.