The following are great resources to prep ahead of time
- Leetcode - Probably the premier pool of interview questions available.
- The Daily Byte - Daily interview questions to your inbox in an order with a curriculum to help foster learning and improving over time. A great option for people stating ahead of time who want to keep consistent.
- Project Euler - Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve.
Preparing for the interviews are not as simple as just memorizing the solutions to problems. Understanding how to approach a problem and analyze the efficiency of a solution are crucial as well when it comes to practicing solving coding questions. If you are starting to prepare far enough in advance a site like The Daily Byte will provide you with a structured curriculum to work your way through a variety of topics that you will encounter in an interview.
Something interviewers will see often is someone who barely speaks when they are solving the problems given to them. Unfortunately solving the problem alone is not enough, when you are being interviewed it is very important to be vocal throughout the process, displaying your thought process. This applies to even before you lay a finger on a key or a marker on the whiteboard. The first thing you should be doing when presented with a question is going over it outloud, if there are any immediate edge cases, asking questions. If you have done a similar problem in the past it probably makes sense to say that you think for example, that using a hashmap in this case makes the most sense to ensure you do not have to iterate over the same array multiple times.
Being vocal about your approach and asking questions will also help prevent the most dreaded scenario of committing to a very wrong approach. While not all interviewers will provide feedback, in some cases by vocalizing before you start the approach you are thinking of taking, an interviewer might ask a question or hint that something might be going in the wrong direction. It is important to pickup on these cues and reexamine your approach if there are concerns.
Whiteboarding is really something that takes practice, knowing how to solve problems is not enough. Make a point to practice talking through(outloud) how you would solve these problems, either with a friend/colleague or by yourself.