Google interview question

Write a code for a given problem like a software engineer interview