Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
Members have full access to the forums. Advertisements are removed for registered users.
Last edited by meghna_tolani; April 2nd, 2014 at 03:43 PM.
Try asking an internet search engine for an algorithm for solving that problem. When you have the algorithm, then try writing code to solve it.
If you have problems writing the code, post the code and your questions about the problems you are having.
If you don't understand my answer, don't ignore it, ask a question.