divide the string in middle and first compare the left sub-string(as they
are MSB)...if they match then compare the right sub-string (iteratively)
if the left substring doesn't match then compare iteratively by dividing
again.
i think this would give complexity in lgn.
Hope this helps!!
On 11 October 2011 08:22, bagaria.ka...@gmail.com
bagaria.ka...@gmail.comwrote:
Given two strings describing the version of a particular software need to
find the later version.
For eg.
1st string = 1.2.4.5
2nd string=1.2.3.5
1st string is the later one.
Can be done using traversing the string and comparing each character one
after the another. Looking for a better solution with lesser complexity.
--
Thanks and Regards
*Karan Bagaria*
*MCA Final Year*
Training and Placement Representative
*NIT Durgapur*
--
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.
--
- A.Sheetal
B.tech, Final yr,
Department Of Information Technology,
NIT, Durgapur
--
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.