First of all practically implement that program on your daily life then think on it, then make some models or rough programs and then try to write a neat program.
Firstfall you think about your own without asking others.you try to solve aptitude questions. So gradually enhance your konwledge and logical thinking.