Re: [algogeeks] Re: can we check a number has last digit 5 or not using bitwise operator.

2012-10-11 Thread Dave
@Jaspreet: The % operator is implemented using division, which is considered an arithmetic operation, not a bitwise operation. On primitive chips, as may be used in specialized hardware, division may not be implemented, in which case a non-division based algorithm may be desired. The questi

Re: [algogeeks] inplace_merge() implementation

2012-10-11 Thread Hanlei Qin
Hi, Amitesh. Forgive me omitted your "implementation" word. As I know inplace_merge(), it is do malloc buffer memory to implement the similar as merge(). But it will divide and conquer, when available buffer is too small. (I guess this will be what you wanna to know.) You can open every STL sour

Re: [algogeeks] inplace_merge() implementation

2012-10-11 Thread Amitesh Singh
Thanks for the reply. Yes. I know that. Can you please provide a working code? C or C++ Regards -- Amitesh On Thu, Oct 11, 2012 at 2:47 PM, Hanlei Qin wrote: > The inplace_merge() function is similar to the merge() function, but > instead of creating a new sorted range of elements, inplace_

Re: [algogeeks] Re: can we check a number has last digit 5 or not using bitwise operator.

2012-10-11 Thread Jaspreet Singh
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 wrote: > @Mohit: The decimal representation of

Re: [algogeeks] Re: can we check a number has last digit 5 or not using bitwise operator.

2012-10-11 Thread mohit mishra
@ Dev Thanx. On Thu, Oct 11, 2012 at 1:25 AM, Dave 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/alg

Re: [algogeeks] inplace_merge() implementation

2012-10-11 Thread Hanlei Qin
The inplace_merge() function is similar to the merge() function, but instead of creating a new sorted range of elements, inplace_merge() alters the existing ranges to perform the merge in-place. --- cppreference.com On Thu, Oct 11, 2012 at 4:02 PM, Amitesh Singh wrote: > Hi, > > Just wondering

[algogeeks] inplace_merge() implementation

2012-10-11 Thread Amitesh Singh
Hi, Just wondering if anybody know the implementation of inplace_merge() defined in C++/STL ( ? Source: http://www.cplusplus.com/reference/algorithm/inplace_merge/ Thanks -- Amitesh -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To po

Re: [algogeeks] Flipkart test

2012-10-11 Thread Avinash Mishra
Thanks bro On 9 October 2012 21:16, Prakhar Jain wrote: > And it was for on-campus. For off-campus,it may differ and I have no idea > about it. > > > -- > Prakhar Jain > IIIT Allahabad > B.Tech IT 4th Year > Mob no: +91 9454992196 > E-mail: rit2009...@iiita.ac.in > jprakha...@gmail.com