@jaytsecan Practice is the key to all three. Sure, "on the job" you'll have access to Google, or your bookshelf, or some cheat sheet you put together to give you an overview of various methods and other data available. However, for any particular API call, once you've used it a couple dozen times, you'll find it less and less necessary to refer to reference material - you'll just know it. (and, in the interviewer's defense, why would they want to hire someone to spend the day Googling instead of coding).
Plus, the more you practice, the more you'll pick up "patterns" on how a particular type of problem is solved. Once you know the pattern, you can remember how you solved it last time, and the 10 times before that and the solution is just "apparent" by virtue of its familiarity.
If the second you see a problem, you instantly have an idea about how to approach it, and you have ready familiarity with the language you'll be implementing in, well that's 9/10 of the battle - so you'll be faster.
The answer to everything: Practice.
If that doesn't work, the answer is: More Practice.
The more problems you solve, the easier it gets - it just makes sense to do all the "hard problems", the ones where you don't know all the language syntax, and you're not yet expert in the common solutions to various types of algorithmic challenges, at the comfort of your own desk, with Google available, and no time limit. Do a couple hundred of them in relative comfort, with no one breathing down your neck, so that you're in tip-top shape when it's time for the real deal. A sports analogy would go well here, but I don't want to be that cheesy