scan the numbers as string
if both strings dont have equal numbers of dots then add trailing 0's with
dots to the string with less number of dots....

now divide both the string into 2 equal halves compare the left half .....if
unequal then divide recursively and again compare left of the divided
string.................if equal the compare the right half and divide and
compare it recursively........this will reduce the complexity to logn.


--


Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
 <http://gplus.to/amolsharma99>
<http://twitter.com/amolsharma99><http://in.linkedin.com/pub/amol-sharma/21/79b/507><http://youtube.com/amolsharma99>





On Thu, Oct 13, 2011 at 2:21 AM, sravanreddy001 <sravanreddy...@gmail.com>wrote:

> it is expected that the version is given as string, in that case, atoi()
> has be used to convert string to int

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to