[algogeeks] thousands of cheating wives profiles

2010-11-21 Thread mohamedkam...@yahoo.com
http://urlder.com/CCb find cheating wives in your area -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to

[algogeeks] switch vs if -- which is faster

2010-11-21 Thread shiva
As per my understanding it is compiler depending thing.. what i feel is switch need to evaluate the expression only once but if else if need to evaluate the expression more than once(what if expression stored in variable and then compare...) Does any one please comment difference in speed of

[algogeeks] for loop performace in terms of speed makes any difference when we run from max to min and min to max

2010-11-21 Thread shiva
I want to know is there any difference between following two loop in terms of speed. 1. for(i=0;imax;i++) { //Some operation } 2. for(i=max; i; i--) { /Some operation } I heard second one is faster but don't have any proof Please comment. -- You received this message because you are

[algogeeks] Mathematics Puzzle

2010-11-21 Thread vamsee marpu
Does anybody know the solution for the following problem : *A headmaster of a primary school performs an activity with the students of a class to encourage them to perform better in academics. He asks them to stand in queue, starts calling the students out one by one and asks them their rank in

[algogeeks] Re: switch vs if -- which is faster

2010-11-21 Thread Chi
As he told you it depends on the data runs to the condition. If for exampe statistically there is more of 1's then 0 then the switch loop is faster, because: 1.) case is isolated 2.) You can reorder the case-statement according to the occurrent of the conditions On Nov 21, 2:59 pm, shiva

Re: [algogeeks] Re: Swap the LSB and MSB within themself of given no.

2010-11-21 Thread coolfrog$
@gene plz explain .. what is going on... by taking example. i am unable to run a test case 1. x=0xAD (1010 1101) 2. x1 ===01011010 | x1 01010110 x =0100 how we will get answer as ( 0101 1011).?? On Sun, Nov 21, 2010 at 9:59 AM, Gene

Re: [algogeeks] Mathematics Puzzle

2010-11-21 Thread Ashim Kapoor
Do you mean if the rank of a student is better than the rank of the prev student then he/she gets a lollipop? Thank you, Ashim On Sun, Nov 21, 2010 at 6:57 PM, vamsee marpu marpu.vam...@gmail.comwrote: Does anybody know the solution for the following problem : *A headmaster of a primary

Re: [algogeeks] Re: switch vs if -- which is faster

2010-11-21 Thread MOHIT ....
its depend on compiler how it optimize it . he can make binary search tree for this comparison or perform cascading comparison as in if else case .. so worst case complexity will be as of if- else . but for this case switch(i) { case 4: //some operation case 5:// some operation case 6 : //

[algogeeks] Re: Swap the LSB and MSB within themself of given no.

2010-11-21 Thread Dave
@Coolfrog$: Don't forget the bitwise logical products. What is the bit patterns in those hexadecimal constants? Work out the whole example and you will see how it works. -- Dave On Nov 21, 8:21 am, coolfrog$ dixit.coolfrog.div...@gmail.com wrote: @gene plz explain .. what is going on... by

[algogeeks] Re: switch vs if -- which is faster

2010-11-21 Thread Chi
@Mohit: No, it's just the hierarchical occurent of conditions that makes the switch faster. I really doubt that a compiler build a binary search tree for switches. Also, it a binary tree works for switches why it can't optimize the if-else-condition? Did you make some testing? On Nov 21, 3:28 

[algogeeks] GOOGLE SUMMER OF CODE

2010-11-21 Thread ankit sablok
WHEN IS GOOGLE SUMMER OF CODE 2011 BEGINING AND HOW CAN WE APPLY FOR IT AND WHAT ARE THE ELIGIBILITY CRITERIA FOR THE APPLICATION. PLEASE HELP ME OUT WITH THIS APPLICATION PROCEDURE... THNXX IN ADVANCE ANKIT SABLOK B.TECH COMPUTER SCIENCE AND ENGG -- You received this message because you are

[algogeeks] Re: switch vs if -- which is faster

2010-11-21 Thread Gene
A good compiler will never generate a switch that is slower than an if...else chain. They will analyze the switch cases and pick one of several options for code generation. These may include cascaded conditional jumps (like if...else code), simple jump tables, segmented jump tables (cascaded

Re: [algogeeks] Re: switch vs if -- which is faster

2010-11-21 Thread DIPANKAR DUTTA
both are same .. because any good optimizing compiler generate same assembly code of them... On Mon, Nov 22, 2010 at 9:38 AM, Gene gene.ress...@gmail.com wrote: A good compiler will never generate a switch that is slower than an if...else chain. They will analyze the switch cases and pick one

Re: [algogeeks] Re: Swap the LSB and MSB within themself of given no.

2010-11-21 Thread DIPANKAR DUTTA
x=((x3)(0x11)|(a3) 0x88 |(a1) 0x44 | (a1) 0x22) On Sun, Nov 21, 2010 at 11:11 PM, Dave dave_and_da...@juno.com wrote: @Coolfrog$: Don't forget the bitwise logical products. What is the bit patterns in those hexadecimal constants? Work out the whole example and you will see how it works. --

Re: [algogeeks] Re: switch vs if -- which is faster

2010-11-21 Thread LALIT SHARMA
@dipankar Can u tell us , sumthng more in support of ur ans...?? On Mon, Nov 22, 2010 at 10:40 AM, DIPANKAR DUTTA dutta.dipanka...@gmail.com wrote: both are same .. because any good optimizing compiler generate same assembly code of them... On Mon, Nov 22, 2010 at 9:38 AM, Gene

[algogeeks] Re: switch vs if -- which is faster

2010-11-21 Thread Gene
I'm not sure what you mean by support. If you mean examples, gcc uses several of the techniques I mentioned. Write some switch statements with different distributions of cases. Compile with -S, and inspect the assembly code. If you don't now how to do that, take the time to learn. If you mean

[algogeeks] Re: Mathematics Puzzle

2010-11-21 Thread shiva
If all the person got his rank increased except the first(he is last know) then 1. if the previous first ranked person stand front in queue then 69 lollipop need to be distributed. 2. other case 68 lollipop need to be distributed. On Nov 21, 9:46 pm, Shiv Shankar Prajapati