How can we choose the right algorithm to solve a particular problem and what are the tricks to reduce the execution time of a program.
You should know what what a big O notation is and you have to find out what is complexity of your algorithm in worst case and from that estimate whether this is or is not good approach.