Pergunta de entrevista da empresa Google

You need to write the code for the coding question which interviewer will ask, throw out a brute force solution in the beginning, but you should try to improve your solution as well. Think about the time and space complexity and see if you can improve those. Practice writing code on Google Doc. It is different than a text editor. There’s no indentation, syntax highlight and auto-completion so it’s good to practice on Google doc and get familiar with it. Think out loud and speak clearly (people face trouble here) in phone interviews and tell your strategy to the interviewer to solve the problem. The document will update in real-time. It’s going to be obvious if you are typing your answer or if you are copying and pasting it. The interviewer may ask to do second phone interview if in the first one they won’t be able to assess you properly.