In the same boat as you here.
As everyone here says, you have to practice.
Then, when you're finally fairly good at coding challenge questions, you'll discover that you also have to be good at system design questions which is a different beast altogether. And then you'll learn that instead/addition to the above, company X actually wants you to complete a take-home exercise, and company Y won't consider you because they do Python while you have Java.
It becomes very hard to know what to focus on when you don't have your eyes set on a particular company.