[algogeeks] without using '-'
Find the difference of two numbers without using '-' operator ! plz share ur solutions! -- Cheers, Vicky -- 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.
Re: [algogeeks] without using '-'
find the smallest of two number . then keep adding 1 to the smaller number till you get the bigger number . this will give you absolute diff so check for the correct ans . in case you have floating number then add unit of fraction . and repeat the same . On Mon, Sep 26, 2011 at 7:33 PM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Find the difference of two numbers without using '-' operator ! plz share ur solutions! -- Cheers, Vicky -- 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. -- 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.
Re: [algogeeks] without using '-'
difference = x+ ~y +1 On Mon, Sep 26, 2011 at 7:33 PM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Find the difference of two numbers without using '-' operator ! plz share ur solutions! -- Cheers, Vicky -- 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. -- Regards Kunal Yadav (http://sourcebit.in) -- 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.
Re: [algogeeks] without using '-'
Tricky question with more tricky answers. thank you all. On Mon, Sep 26, 2011 at 9:55 PM, Kunal Yadav kunalyada...@gmail.com wrote: difference = x+ ~y +1 On Mon, Sep 26, 2011 at 7:33 PM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Find the difference of two numbers without using '-' operator ! plz share ur solutions! -- Cheers, Vicky -- 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. -- Regards Kunal Yadav (http://sourcebit.in) -- 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. -- Cheers, Vicky -- 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.
Re: [algogeeks] without using '-'
grt.we never generally use ~ operator. got to knw abt it. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Mon, Sep 26, 2011 at 10:07 AM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Tricky question with more tricky answers. thank you all. On Mon, Sep 26, 2011 at 9:55 PM, Kunal Yadav kunalyada...@gmail.comwrote: difference = x+ ~y +1 On Mon, Sep 26, 2011 at 7:33 PM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Find the difference of two numbers without using '-' operator ! plz share ur solutions! -- Cheers, Vicky -- 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. -- Regards Kunal Yadav (http://sourcebit.in) -- 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. -- Cheers, Vicky -- 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. -- 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.
Re: [algogeeks] without using '-'
thats basically taking twos' compliment and converting it to negative one and then adding it..its the same principle...which is used for dividing two numbers without using '/' and '-'...right kunal?? On Mon, Sep 26, 2011 at 10:38 PM, Ashima . ashima.b...@gmail.com wrote: grt.we never generally use ~ operator. got to knw abt it. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Mon, Sep 26, 2011 at 10:07 AM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Tricky question with more tricky answers. thank you all. On Mon, Sep 26, 2011 at 9:55 PM, Kunal Yadav kunalyada...@gmail.comwrote: difference = x+ ~y +1 On Mon, Sep 26, 2011 at 7:33 PM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Find the difference of two numbers without using '-' operator ! plz share ur solutions! -- Cheers, Vicky -- 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. -- Regards Kunal Yadav (http://sourcebit.in) -- 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. -- Cheers, Vicky -- 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. -- 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. -- Thanks Regards Abhishek Gupta -- 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.
Re: [algogeeks] without using '-'
+1 to abhishek On Mon, Sep 26, 2011 at 11:44 PM, Abhishek Gupta guptaabhishe...@gmail.comwrote: thats basically taking twos' compliment and converting it to negative one and then adding it..its the same principle...which is used for dividing two numbers without using '/' and '-'...right kunal?? On Mon, Sep 26, 2011 at 10:38 PM, Ashima . ashima.b...@gmail.com wrote: grt.we never generally use ~ operator. got to knw abt it. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Mon, Sep 26, 2011 at 10:07 AM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Tricky question with more tricky answers. thank you all. On Mon, Sep 26, 2011 at 9:55 PM, Kunal Yadav kunalyada...@gmail.comwrote: difference = x+ ~y +1 On Mon, Sep 26, 2011 at 7:33 PM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Find the difference of two numbers without using '-' operator ! plz share ur solutions! -- Cheers, Vicky -- 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. -- Regards Kunal Yadav (http://sourcebit.in) -- 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. -- Cheers, Vicky -- 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. -- 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. -- Thanks Regards Abhishek Gupta -- 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. -- 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.
Re: [algogeeks] without using '-'
@abhishek: absolutely correct abhishek :) On Mon, Sep 26, 2011 at 11:53 PM, aditya kumar aditya.kumar130...@gmail.com wrote: +1 to abhishek On Mon, Sep 26, 2011 at 11:44 PM, Abhishek Gupta guptaabhishe...@gmail.com wrote: thats basically taking twos' compliment and converting it to negative one and then adding it..its the same principle...which is used for dividing two numbers without using '/' and '-'...right kunal?? On Mon, Sep 26, 2011 at 10:38 PM, Ashima . ashima.b...@gmail.com wrote: grt.we never generally use ~ operator. got to knw abt it. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Mon, Sep 26, 2011 at 10:07 AM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Tricky question with more tricky answers. thank you all. On Mon, Sep 26, 2011 at 9:55 PM, Kunal Yadav kunalyada...@gmail.comwrote: difference = x+ ~y +1 On Mon, Sep 26, 2011 at 7:33 PM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Find the difference of two numbers without using '-' operator ! plz share ur solutions! -- Cheers, Vicky -- 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. -- Regards Kunal Yadav (http://sourcebit.in) -- 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. -- Cheers, Vicky -- 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. -- 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. -- Thanks Regards Abhishek Gupta -- 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. -- 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. -- Regards Kunal Yadav (http://sourcebit.in) -- 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.
Re: [algogeeks] without using '-'
difference = x^y On Tue, Sep 27, 2011 at 1:42 AM, Kunal Yadav kunalyada...@gmail.com wrote: @abhishek: absolutely correct abhishek :) On Mon, Sep 26, 2011 at 11:53 PM, aditya kumar aditya.kumar130...@gmail.com wrote: +1 to abhishek On Mon, Sep 26, 2011 at 11:44 PM, Abhishek Gupta guptaabhishe...@gmail.com wrote: thats basically taking twos' compliment and converting it to negative one and then adding it..its the same principle...which is used for dividing two numbers without using '/' and '-'...right kunal?? On Mon, Sep 26, 2011 at 10:38 PM, Ashima . ashima.b...@gmail.comwrote: grt.we never generally use ~ operator. got to knw abt it. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Mon, Sep 26, 2011 at 10:07 AM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Tricky question with more tricky answers. thank you all. On Mon, Sep 26, 2011 at 9:55 PM, Kunal Yadav kunalyada...@gmail.comwrote: difference = x+ ~y +1 On Mon, Sep 26, 2011 at 7:33 PM, ~*~VICKY~*~ venkat.jun...@gmail.com wrote: Find the difference of two numbers without using '-' operator ! plz share ur solutions! -- Cheers, Vicky -- 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. -- Regards Kunal Yadav (http://sourcebit.in) -- 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. -- Cheers, Vicky -- 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. -- 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. -- Thanks Regards Abhishek Gupta -- 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. -- 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. -- Regards Kunal Yadav (http://sourcebit.in) -- 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. -- *..* * **Regards Sandeep Kumar MTech Computer Science **IIT Madras* Music washes away from the soul the dust of everyday life - -- 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.
Re: [algogeeks] without using '-'
@sandeep: Its simple xor. How can this be equal to difference?? -- 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.