There is no general rule for this unfortunately, some interviews may be on a computer with access to the internet and they may be fine with you searching online, some may ask you to solve on a whiteboard in front of them, and then there's a million variations in between.
So instead of trying to suggest whether it's OK to use google or not, I feel the answer you actually need is to know what you can do when you can't use your normal tools (i.e. when you are restricted to just your memory).
I'd suggest the following for best communicating your skills:
For problems you can solve directly, solve them first.
If you believe there is a better way, make this clear. If this relies on some knowledge you don't know off the top of your head - detail why you think there's a better way, and what you what specific things you need to double check. For example: "I think we can improve this using x
, but I'm not sure if y
behaves like this or not - I'd need to check this first".
If you only know how to partially solve a problem, abstract the areas you can't solve and then proceed to solve the problem with those assumptions detailed. For example, "We need to get a
to work with b
, I'm not sure exactly how we'd do that - so I'd need to check up on it first - but after that, it would allow c
to do this that and the other".
If you don't know how to solve it at all, detail similar problems that you have solved before and how these relate to your current problem. Give ideas on what you think you'd need to look into. "I'm not sure exactly how to do this, but it looks similar to y
I've worked on before. My gut instinct is part of it can be solved by something similar to z
- which I think we could look into".
The key with all of these is to never give no-answer. Even the questions you are completely stumped by, you should be answering how you would go about getting the specific information you need and what exactly you are unsure of.
There's no way to know what tools you will or will not be allowed to use in a certain interview, nor is there a way to guess what an employer is looking for in your solutions. But if you give as much detail on what parts you don't understand as possible, you'll be able to show your skills and experience to their fullest.