Re: [algogeeks] Re: Repeated values

2012-11-02 Thread Vikram Pradhan
: It won't enter an infinite loop in that case. In fact, it would immediately return. Don On Oct 31, 2:39 pm, Vikram Pradhan vpradha...@gmail.com wrote: @Don It will be an infinite loop for some cases ...like try this i=1, and a[1] = 5 , a[5] = 5 *Solution:* As the numbers are from 0 to N

Re: [algogeeks] Re: #in macros

2012-10-30 Thread Vikram Pradhan
. 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. -- Vikram Pradhan | B.Tech| Computer Science Engineering | NIT Jalandhar | 9740186063 | -- You received this message because

Re: [algogeeks] C Macro

2012-10-30 Thread Vikram Pradhan
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. -- Vikram Pradhan

Re: [algogeeks] Re: Range Checking Efficiently C++

2012-10-28 Thread Vikram Pradhan
. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Vikram Pradhan | B.Tech| Computer Science Engineering | NIT Jalandhar | 9740186063 | -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] Re: Range Checking Efficiently C++

2012-10-28 Thread Vikram Pradhan
we can use masking of most significant bit of the xor of (a-x) and ( b-x) to check if axb if [ ((a-x)^(b-x)) 0x8000 ] then it's in range else not in range On Sat, Oct 27, 2012 at 11:17 PM, Vikram Pradhan vpradha...@gmail.comwrote: how about ...if( (a-x)^(b-x) 0