Their is a solution of many competitive coding question so you can go through it.
solutions to some of the competitive coding problems.