Nice solution Dave sir .. but if you know can you please tell us what is the internal structure of "%" operator .. i mean it has also to be done by bitwise any way .. so can't we implement that in HHLs.
Thanks On Thu, Oct 11, 2012 at 1:25 AM, Dave <dave_and_da...@juno.com> wrote: > @Mohit: The decimal representation of a number ends in 5 if its low order > bit is 1 and it is divisibile by 5. > > An algorithm using bitwise operations to check for divisibility by 5 is > given at > https://groups.google.com/d/msg/algogeeks/I5HWmwKW_ks/n38FWJSd0l8J. > > It probably is not as fast as (n & 1) && (n % 5 == 0), though. > > Dave > > On Wednesday, October 10, 2012 4:06:28 AM UTC-5, mohit mishra wrote: > >> >> -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/algogeeks/-/bRupe9F1MUIJ. > > 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. > -- 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.