Re: [algogeeks] Amazon Onsite Chennai SDE
Levensteins algorithm On 14 Nov 2011 18:19, aniket chatterjee aniket...@gmail.com wrote: yeah, that is normal bryteforce. Any better idea? On 11/14/11, Ankur Garg ankurga...@gmail.com wrote: We can use a trie here .. Create a trie with all words of dictionary . Now delete the last character of the word and check if such a word is a valid word . If not see if adding a new character can make it a valid word . If not delete the next character and repeat the process again . This is what I can think of here. Any other solutions/guesses ? On Mon, Nov 14, 2011 at 12:43 PM, Aniket aniket...@gmail.com wrote: You are given a word and a dictionary. Now propose an algorithm edit the word (insert / delete characters) minimally to get a word that also exists in the dictionary. Cost of insertion and deletion is same. Write pseudocode for it. Seems like minimum edit distance problem but some modification is needed. -- 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. -- 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] Source Bits
Technical Interview : - Tell me about yourself ? I emphasized more on my OpenSource projects and the Contribution to Amarok ( Video Player Project ). I even stressed on my knowledge of Qt Programming ( C++ library for Developing User Interfaces on Linux Platform ). - What do you mean by OpenSource ? OpenSource softwares basically mean that the source code is open to you which provides the user the power to change his system in a way he likes. The quote I gave was “ OpenSource Softwares make you the master of your system rather than system mastering you” . - Tell me the basics of Qt Programming ? Qt Programming http://en.wikipedia.org/wiki/Qt_(framework) - What do you mean by signals and slots in Qt? - How does Signals, slots and functions internally work in C++? - Then some concepts on C++ programming ( Virtual Functions , Virtual Destructors ( Their internal Working ) ? - Some basic concepts of Inheritence and Overriding with examples. - Some basic concepts on Semaphores and their working ( With Implementation). HR Round : HR round was on Skype Video chatting on a MacBook Pro ( Awesome). - Tell me about yourself ,your family and your extra curricular activities. - What do you know about SourceBits? - She asked my CET ranking and my aggregate in RVCE . - I was asked about my projects . - Why do you want to join SourceBits? - What are the other offers you got? On Sun, Sep 25, 2011 at 11:51 AM, Manoj Bagari manojbag...@gmail.comwrote: first of all congrats rajeev for the placements :) :) rajeev can u please tell us in more detaill about the technical anr hr around can u find any differenence on giving hr through skype can u list questions that were asked in techinacal and hr around -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Source Bits
5.5 Lakhs On Tue, Sep 27, 2011 at 7:01 PM, aditya kumar aditya.kumar130...@gmail.comwrote: rajeev hw much did they offer u ? On Tue, Sep 27, 2011 at 5:55 PM, rajeev bharshetty rajeevr...@gmail.comwrote: Technical Interview : - Tell me about yourself ? I emphasized more on my OpenSource projects and the Contribution to Amarok ( Video Player Project ). I even stressed on my knowledge of Qt Programming ( C++ library for Developing User Interfaces on Linux Platform ). - What do you mean by OpenSource ? OpenSource softwares basically mean that the source code is open to you which provides the user the power to change his system in a way he likes. The quote I gave was “ OpenSource Softwares make you the master of your system rather than system mastering you” . - Tell me the basics of Qt Programming ? Qt Programminghttp://en.wikipedia.org/wiki/Qt_(framework) - What do you mean by signals and slots in Qt? - How does Signals, slots and functions internally work in C++? - Then some concepts on C++ programming ( Virtual Functions , Virtual Destructors ( Their internal Working ) ? - Some basic concepts of Inheritence and Overriding with examples. - Some basic concepts on Semaphores and their working ( With Implementation). HR Round : HR round was on Skype Video chatting on a MacBook Pro ( Awesome). - Tell me about yourself ,your family and your extra curricular activities. - What do you know about SourceBits? - She asked my CET ranking and my aggregate in RVCE . - I was asked about my projects . - Why do you want to join SourceBits? - What are the other offers you got? On Sun, Sep 25, 2011 at 11:51 AM, Manoj Bagari manojbag...@gmail.comwrote: first of all congrats rajeev for the placements :) :) rajeev can u please tell us in more detaill about the technical anr hr around can u find any differenence on giving hr through skype can u list questions that were asked in techinacal and hr around -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Source Bits
SourceBits visited *RV College of Engineering *in Bangalore on 23rd Sepetember. There were 20 aptitude questions and 10 basic C Questions. 1 Technical interview Round and 1 HR Round. Apti Questions were usually from RS aggarwal (OK Type) C Questions were very easy . Just brush up the basics . In Technical Interviews they asked some basic OOPS concepts,C concepts and on Semaphores and stuff.Quite easy to crack. HR was on Skype where usual HR questions were asked. On Sun, Sep 25, 2011 at 10:55 AM, aanchal goyal goyal.aanch...@gmail.comwrote: which all colleges have sourcebits visited? please share the questions asked/ pattern... thanks -- Regards,* Aanchal Goyal*. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] activation record
http://www.enel.ucalgary.ca/People/Norman/enel339fall2000/activ_rec/ False On Fri, Sep 2, 2011 at 10:13 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: what are activation records?? On Fri, Sep 2, 2011 at 9:00 PM, sukran dhawan sukrandha...@gmail.comwrote: true On Fri, Sep 2, 2011 at 7:44 PM, priya ramesh love.for.programm...@gmail.com wrote: Allocation and deallocation of activation records is always done using a stack (LIFO) structure. True or false?? -- 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, Kamakshi kamakshi...@gmail.com -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] recursion
Non Recursive calls store the local variables and stuff in stack whereas in recursive calls the return addresses and the local variables for each call are stored as stack frames with frame pointers and stack pointers. On Thursday, September 1, 2011, teja bala wrote: @priya stack is a non recursive version of a recursion. eg:- fac(int x) { f1( )//non recursive call ~= recursive indirectly { if(x0) { fac(x--);//recursive call } } } -- 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.comjavascript:_e({}, 'cvml', 'algogeeks@googlegroups.com'); . To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com javascript:_e({}, 'cvml', 'algogeeks%2bunsubscr...@googlegroups.com');. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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.
[algogeeks] Motorola Interview Question
What does Blacklisting of drivers mean in Linux ? Explain How you go about doing Blacklisting of Drivers ? Explain??? -- Regards Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Hexadecimal to Decimal
@Arpit : Could you please post the solution . On Thursday, September 1, 2011, Arpit Sood wrote: in the same way as you do for binary to decimal, only base needs to be changed On Thu, Sep 1, 2011 at 10:04 PM, rShetty rajeevr...@gmail.comjavascript:_e({}, 'cvml', 'rajeevr...@gmail.com'); wrote: Given a Hexadecimal value as a string, give a C Code to convert it into decimal value? If 0xff then output should be 255. -- 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.comjavascript:_e({}, 'cvml', 'algogeeks@googlegroups.com'); . To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com javascript:_e({}, 'cvml', 'algogeeks%2bunsubscr...@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.comjavascript:_e({}, 'cvml', 'algogeeks@googlegroups.com'); . To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com javascript:_e({}, 'cvml', 'algogeeks%2bunsubscr...@googlegroups.com');. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Hexadecimal to Decimal
@Don : Thanks , are there any other methods On Thursday, September 1, 2011, Don wrote: int n; char *string = 0xff; // Or whatever sscanf(string, %x, n); printf(%d\n, n); On Sep 1, 11:34 am, rShetty rajeevr...@gmail.com javascript:; wrote: Given a Hexadecimal value as a string, give a C Code to convert it into decimal value? If 0xff then output should be 255. -- 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.comjavascript:; . To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com javascript:;. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Re: fork()
I ran the code on gcc and the answer is 20 times On Wed, Aug 31, 2011 at 9:59 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote: it will be 16 .. On Wed, Aug 31, 2011 at 9:54 PM, abhishek abhishek.ma...@gmail.comwrote: i think it will be 16 (not sure ) can anyone explain how it will be 20, On Aug 31, 9:02 pm, SANDEEP CHUGH sandeep.aa...@gmail.com wrote: i thinks it is 16 not 20 please check that On Wed, Aug 31, 2011 at 9:18 PM, annarao kataru kataruanna...@gmail.comwrote: @swathi :: why it is 20 times ?? ur answer is correct but plz explain the process?? -- 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. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] String Reverse
@Dheeraj : I think the question says no swapping. On Mon, Aug 29, 2011 at 6:56 PM, Karan Thakral karanthak...@gmail.comwrote: use xor inplace of a swap...u wont require extra space or memory... printing isnt a solution... On Mon, Aug 29, 2011 at 6:15 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: void rev_str(int i) { if(i==((length/2))) return ; rev_str(i+1); SWAP(str[i],str[length-1-i],t); } passing 0 as parameter... On Mon, Aug 29, 2011 at 5:43 PM, mani walia manis...@gmail.com wrote: aa chak code #includeconio.h #includestdio.h void rev(char*); int main() { rev(hello sexy how are you); getch(); } void rev(char *t) { if(*t) { rev(t+1); } printf(%c,*t); } khush reh... lol On Mon, Aug 29, 2011 at 5:38 PM, saurabh singh saurab...@gmail.comwrote: http://www.ideone.com/kSaff On Mon, Aug 29, 2011 at 4:17 PM, rohit agarwal agarwal.rohi...@gmail.com wrote: Print the last character of a string and call the function recursively with remaining string (of length (n-1)) -- * Thanks and Regards* ┌─┐ Rohit Agarwal Final Year B.Tech (Information Technology) NIT Durgapur http://www.nitdgp.ac.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. -- Saurabh Singh B.Tech (Computer Science) MNNIT ALLAHABAD -- 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. -- *Dheeraj Sharma* Comp Engg. NIT Kurukshetra +91 8950264227 -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] C puzzle
@Anup : I think you should also try to compile and check the answer... May be I am wrong But compiler won't On Mon, Aug 29, 2011 at 11:02 PM, Anup Ghatage ghat...@gmail.com wrote: @Rajeev: I had written down the recursion tree on paper but since you said that there were 10 reds and greens, I compiled the code and checked it myself. I'm afraid you are wrong my friend. The correct answer is indeed 6 RED and 10 GREEN calls. -- Anup Ghatage -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Dead code removal for c program
You can go through this link http://gcc.gnu.org/ml/gcc-help/2003-08/msg00128.html On Sat, Aug 27, 2011 at 6:49 PM, john robin john.robin...@gmail.com wrote: Hi, I've an interesting task. Given a c program say hi.c as input to a program, the program should be able to return a file hi1.c such that all dead codes are removed from the source code submitted. refer link to know abt dead code http://en.wikipedia.org/wiki/Dead_code_elimination int main(void) { int a = 5; int b = 6; int c; c = a * (b 1); if (0) { /* DEBUG */ printf(%d\n, c); } return c; } in the above snippet if(0){ } is dead code as it'll never be executed so the output shld be int main(void) { int a = 5; int b = 6; int c; c = a * (b 1); return c; } Any ideas as to how to solve this interesting problem ? -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Dead code removal for c program
Usually compilers do the job of dead code elimination during optimizations. Gcc does that during compilation. On Sun, Aug 28, 2011 at 1:34 AM, rajeev bharshetty rajeevr...@gmail.comwrote: You can go through this link http://gcc.gnu.org/ml/gcc-help/2003-08/msg00128.html On Sat, Aug 27, 2011 at 6:49 PM, john robin john.robin...@gmail.comwrote: Hi, I've an interesting task. Given a c program say hi.c as input to a program, the program should be able to return a file hi1.c such that all dead codes are removed from the source code submitted. refer link to know abt dead code http://en.wikipedia.org/wiki/Dead_code_elimination int main(void) { int a = 5; int b = 6; int c; c = a * (b 1); if (0) { /* DEBUG */ printf(%d\n, c); } return c; } in the above snippet if(0){ } is dead code as it'll never be executed so the output shld be int main(void) { int a = 5; int b = 6; int c; c = a * (b 1); return c; } Any ideas as to how to solve this interesting problem ? -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- Regards Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Android development
http://openprobe.blogspot.com/2011/03/android-sdk-installation-in-linux.html this might help!!! On Thu, Aug 25, 2011 at 3:09 PM, Rajeshwar Patra rajeshwarpa...@gmail.comwrote: How to install android on my system . I am using ubuntu 10.10 -- *Rajeshwar Patra,* *MCA final year,* *Nit Durgapur* -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Doubt
Its 2 2 on gcc compiler. Some compilers support overwriting of the const variables which is usually a bug if program expects the value of a variable to be constant . Usually newer compilers don't show such bugs. On Sun, Aug 21, 2011 at 8:59 PM, Sanjay Rajpal srn...@gmail.com wrote: i was also amazed to see the mystery behind 'const' keyword. Sanju :) On Sun, Aug 21, 2011 at 8:27 AM, shady sinv...@gmail.com wrote: woh, thought provoking, it giving 2 2 when there is not const i think it has something to do with how 'const' modifies the behaviour of storage On Sun, Aug 21, 2011 at 8:33 PM, Kamakshii Aggarwal kamakshi...@gmail.com wrote: But on dev c it is showing o/p as 2 2 .. I too have a doubt,a similar question was asked in atrenta's written paper. On Sun, Aug 21, 2011 at 8:14 PM, Ankur Khurana ankur.kkhur...@gmail.com wrote: can somebody please explain this ? On Sun, Aug 21, 2011 at 8:08 PM, Nikhil Gupta nikhilgupta2...@gmail.com wrote: http://www.ideone.com/kRaMj I found this in the algogeeks forum only. Can anyone explain how value of i is still 0, but *p shows 2 although their addresses are the same. -- Nikhil 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. -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- 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, Kamakshi kamakshi...@gmail.com -- 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. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] mutex
Mutexes are used for synchronisation. Basically they allow only one process to access any shared memory at a time thus helping sync among processes. On Wed, Aug 17, 2011 at 9:29 PM, Aman Kumar amanas...@gmail.com wrote: can we use mutex for synchronization? if yes why? -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Re: C output
No the warning in gcc is ibm1.c: In function ‘main’: ibm1.c:7:19: warning: initialization discards qualifiers from pointer target type On Wed, Aug 17, 2011 at 11:50 AM, venkat p.venkatesh...@gmail.com wrote: yes u r correct On Aug 16, 8:22 pm, Sanjay Rajpal sanjay.raj...@live.in wrote: This is becuase Hello is a constant string and constant strings get stored in *Data Area, not in stack for the function you called. *Thats why pointer to constant string will be returned and program will not produce any error. Sanjay Kumar B.Tech Final Year Department of Computer Engineering National Institute of Technology Kurukshetra Kurukshetra - 136119 Haryana, India On Tue, Aug 16, 2011 at 8:19 AM, rohit raman.u...@gmail.com wrote: #includestdio.hconst char *fun(); int main() { char *ptr = fun(); return 0; }const char *fun() { return Hello; } Why doesn't this code give error?? -- 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/-/qeUTNwGNKfwJ. 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Re: Memory Leak
You can refer http://www.linuxjournal.com/article/6556 and http://msdn.microsoft.com/en-us/library/ms859415.aspx Quote from MSDN : ***Basically, you can spot a memory leak when you detect an unexplained increase in either committed system memory—memory used by various applications—or in memory owned by a specific application. There are several approaches to take for checking the current memory situation, as follows: . * - *Run the mi command. At the cesh prompt, type mi. This command generates a list of memory usages for each running application. In the Page Summary line specified for each application, you will see “r/w=” followed immediately by a number. This number indicates the number of allocated pages of memory for the indicated application. If this number is unexpected or has grown unexpectedly, you may have detected a memory leak in the indicated application.* On Tue, Aug 16, 2011 at 10:56 PM, Jacob Ridley jridley2...@gmail.comwrote: Use WinDbg-UMDH to find which stack is making more allocations. On Aug 15, 3:03 am, SAMMM somnath.nit...@gmail.com wrote: How to detect in which line the Memory Leak has occured ?? I want the line number where the Memory leak occurs ??? Give every wild answer u can think off -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] operating system mcq
Timothy J William MCQ's http://s244.filesonic.in/download/1662179664/4e47a18f/6312d950/0/1/b4d72a29/0/49e7f6c2daf916cf807a0678329c153d3324519b On Mon, Aug 15, 2011 at 3:24 AM, nivedita arora vivaciousnived...@gmail.com wrote: hi, can someone pls provide good source from where i can prac mcq on OS . thx -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] operating system mcq
Here is the alternative link http://www.mediafire.com/?e69mami0u2mvt67 On Mon, Aug 15, 2011 at 4:52 PM, aditi garg aditi.garg.6...@gmail.comwrote: @rajeev: it is saying that the link has expired...Do u hv any alternative link...?? On Mon, Aug 15, 2011 at 4:21 PM, rajeev bharshetty rajeevr...@gmail.comwrote: Timothy J William MCQ's http://s244.filesonic.in/download/1662179664/4e47a18f/6312d950/0/1/b4d72a29/0/49e7f6c2daf916cf807a0678329c153d3324519b On Mon, Aug 15, 2011 at 3:24 AM, nivedita arora vivaciousnived...@gmail.com wrote: hi, can someone pls provide good source from where i can prac mcq on OS . thx -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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. -- Aditi Garg Undergraduate Student Electronics Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] mcq-os
All the above 1,2,3 Semaphores help to prevent race conditions in a program. They help in process synchronization by allowing multiple processes access to a common shared memory . and they also solve the problem of mutual exclusion allowing only a single process in a critical region at a time. Correct me if i am wrong. On Mon, Aug 15, 2011 at 6:29 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: semaphores are used to solve the problem of? 1.process synchronization 2.race around 3.mutual exclusion. -- Regards, Kamakshi kamakshi...@gmail.com -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Operators
Does context dependent means a single operator having different meaning when used in different contexts or scenarios??? If so then * is dereferencing operator for pointers and also an arithmetic operator as *a pointer dereference and a*b multiplication and (bitwise and) and also address operator if used as int *a=a and # is used for concatenation as s1##s2 or to keep the name as it is we use #s1 Correct me if i am wrong On Mon, Aug 15, 2011 at 6:45 PM, aditi garg aditi.garg.6...@gmail.comwrote: Pick the operators whose meaning is context dependent? 1. * 2.# 3. 4.No such operator exists Plz gv the diff contexts if applicable... -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] operating system mcq
@kamakshi : Check for the mediafire link and not the filesonic link http://www.mediafire.com/?e69mami0u2mvt67 On Mon, Aug 15, 2011 at 5:12 PM, priya ramesh love.for.programm...@gmail.com wrote: Do anyone of you have c++ MCQ book?? Perhaps test your c++ skills by kanetkar?? I'm not able to find good resources on net. Plz help by snding e books or docs -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] mcq-os
@kamakshi : Check this link. It has a very good explanation http://stargazer.bridgeport.edu/sed/projects/cs503/Spring_2001/kode/os/sync.htm On Mon, Aug 15, 2011 at 6:37 PM, sandeep pandey sandeep.masum4...@gmail.com wrote: ya i also think all of d above.. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] amazon question
First approach : I think you can solve the above problem using Levenshtein Distance (edit distance which is basically no of operations required to transform word1 to word2) . Algo can be found here http://en.wikipedia.org/wiki/Levenshtein_distance Second approach : Store the words in trie data structure and then do a BFS on trie to achieve the solution. Hope this helps!!! On Mon, Aug 15, 2011 at 10:08 PM, priya ramesh love.for.programm...@gmail.com wrote: You are given a dictionary of all valid words. You have the following 3 operations permitted on a word: delete a character, insert a character, replace a character. Now given two words - word1 and word2 - find the minimum number of steps required to convert word1 to word2. (one operation counts as 1 step.) -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Doubt !!!!!!
@anika and sagar : Thanks Got it. On Sun, Aug 14, 2011 at 6:25 PM, sagar pareek sagarpar...@gmail.com wrote: @rshetty for the first code u have array as : --_ _ _ _ _ _ _ _ _ _ ( _ denotes block of int) so sizeof(*p) is ofcourse give you sze of int now u have int *p[10][20]; which can be viewed as _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ now *p is first 20 blocks (mean first whole row) which gives you sizeof(*p) as sizeof(int)*20 which is *not equal* to sizeof(int)*20**10; * On Sun, Aug 14, 2011 at 6:12 PM, rShetty rajeevr...@gmail.com wrote: Please explain this ... #includestdio.h int main() { int *p[10]; printf(%d,sizeof(*p)); return 0; } Output is 4 For this program #includestdio.h int main() { int *p[10][20]; printf(%d,sizeof(*p)); return 0; } Output is 80 (10*20*sizeof(int)) -- 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 SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] what is the difference between a class and structure in c++? pl help
Class by default is private and struct by default is public. On Sun, Aug 14, 2011 at 7:13 PM, programming love love.for.programm...@gmail.com wrote: -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Todays PEP question
3 is the answer . do being exit controlled loop , x is incremented to 2 and then checked for condition which happens to be false here (22) So t is incremented only 3 times. On Mon, Aug 15, 2011 at 12:44 AM, aditi garg aditi.garg.6...@gmail.comwrote: 3 On Mon, Aug 15, 2011 at 12:38 AM, Adi Srikanth adisriika...@gmail.comwrote: int main() { int x=0,t=0; switch(x) { case 0: x++; do { case 1:t++; case 2:t++; case 3:t++; x++; } while(x2); } printf(%d\n,t); return 0; } t will be wat???...3, 6 or 9 Regards, Srikanth. -- 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. -- Aditi Garg Undergraduate Student Electronics Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Memory Leak
Valgrind is an effective open source tool to detect memory leaks and many more bugs in the program. http://valgrind.org/ On Mon, Aug 15, 2011 at 6:31 AM, *$* gopi.komand...@gmail.com wrote: use crtdbg.h _crtdumpmemoryleaks() .. will work only in debug version. On Mon, Aug 15, 2011 at 4:01 AM, Ankur Garg ankurga...@gmail.com wrote: Where ever u have allocated dynamic memory that qualifies to be a culprit for causing memory leak ...Scan through the code if the memory block has been deallocated or not ... Regards Ankur On Sun, Aug 14, 2011 at 6:03 PM, SAMMM somnath.nit...@gmail.com wrote: How to detect in which line the Memory Leak has occured ?? I want the line number where the Memory leak occurs ??? Give every wild answer u can think off -- 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. -- Thx, --Gopi -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Re: Normalised !!
@divye and abhishek : Thanks :) On Tue, Aug 9, 2011 at 11:00 PM, DK divyekap...@gmail.com wrote: Please read the specifications IEEE 754 for representation of single digit floating point numbers. http://en.wikipedia.org/wiki/Single_precision_floating-point_format http://en.wikipedia.org/wiki/IEEE_754-2008 In short, the format is: (1)(8)(23) | sign bit | exponent + 127 | mantissa | given the number is represented in base 2 format. eg. 5.375 = 101 + bin(.375) bin(.375) 0.375 x 2 = 0.75 (0) 0.75 x 2 = 1.5 (1) 0.5 x 2 = 1. therefore bin(5.375) = 101.011 Shifting decimal point = 1.01011 x 2^2 Sign bit = 0 Exponent = 127 + 2 = 129 = 1000 0001 Mantissa = 0101 1000 000 Floating point representation: 0 | 1000 0001 | 0101 1000 000| -- DK http://www.divye.in http://twitter.com/divyekapoor http://gplus.to/divyekapoor -- 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/-/GahSJFDLuF0J. 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] String Doubt
3,4 On Sat, Aug 13, 2011 at 7:39 PM, Raman raman.u...@gmail.com wrote: In statement 2, isn't p pointing to const string, as we cannot modify the characters of the string. -- 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/-/FU-nrcTBpCoJ. 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] os
Round Robin .. On Thu, Aug 11, 2011 at 11:01 AM, siddharam suresh siddharam@gmail.comwrote: shortest preemptive job first Thank you, Siddharam On Thu, Aug 11, 2011 at 10:49 AM, krishna meena krishna.meena...@gmail.com wrote: Consider a set of n teaks with known runtimes r1,r2,r3rn to be run on a uni-processor machine. which processor scheduling algorithm will result in the maximum throughput? -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Trees
@all : Could anyone explain it using the tree diagram . @nithin : 4 may not be th answer i am not able to plot into a tree satisfying those constarints On Thu, Aug 11, 2011 at 9:16 PM, Nitin Nizhawan nitin.nizha...@gmail.comwrote: i guess answer is c. 4 n*i+1 On Thu, Aug 11, 2011 at 8:01 PM, rShetty rajeevr...@gmail.com wrote: A complete n- array tree in which each node has n children or no children, let i be the number of internal nodes and L be the number of leaves in a complete n- array tree. If L=41 and i=10 what is the value of n. a. 3b. 6 c. 4 How to solve such problems?? -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Re: Trees
@amit: Thanks On Thu, Aug 11, 2011 at 10:04 PM, amit karmakar amit.codenam...@gmail.comwrote: I tried solving this problem and came to conclusion that none of the options can be correct. Indeed for value 5, you can have a solution. Then i googled for this question, and found out that, you have an option missing. i.e 5 :| On Aug 11, 9:01 pm, rajeev bharshetty rajeevr...@gmail.com wrote: @all : Could anyone explain it using the tree diagram . @nithin : 4 may not be th answer i am not able to plot into a tree satisfying those constarints On Thu, Aug 11, 2011 at 9:16 PM, Nitin Nizhawan nitin.nizha...@gmail.comwrote: i guess answer is c. 4 n*i+1 On Thu, Aug 11, 2011 at 8:01 PM, rShetty rajeevr...@gmail.com wrote: A complete n- array tree in which each node has n children or no children, let i be the number of internal nodes and L be the number of leaves in a complete n- array tree. If L=41 and i=10 what is the value of n. a. 3b. 6 c. 4 How to solve such problems?? -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Data Structure Objective Question
Queue On Thu, Aug 11, 2011 at 10:36 PM, Mani Bharathi manibharat...@gmail.comwrote: Which data structure is useful in transferring a given graph by breadth first search. a. heapb. linkedlist c. array d. stack e. queue -- 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/-/alG2ZKpLT64J. 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Amazon Question
4) b 3) a Correct me if i am wrong On Mon, Aug 8, 2011 at 7:54 PM, Dipankar Patro dip10c...@gmail.com wrote: 1. O(n) 2. (b) On 8 August 2011 19:24, ankit sambyal ankitsamb...@gmail.com wrote: Plz give the answers ... 1. In a binary max heap containing n numbers, the smallest element can be found in time ?? 2. The number of total nodes in a complete balanced binary tree with n levels is, a)3^n + 1 b)2^(n+1) - 1 c) 2^n + 1 d) none of above 3. In a country where everyone wants a boy, each family continues having babies till they have a boy. After some time, what is the proportion of boys to girls in the country? (Assuming probability of having a boy or a girl is the same) a) 1:2 b) 2:1 c)1:1 d)1:4 4. A parallel program consists of 8 tasks – T1 through T8. Each task requires one time step to be executed on a single processor. Let X - Y denote the fact that task X must be executed before task Y is executed. Suppose only the tasks X, Y are to be executed. On any multiprocessor machine it would require at least 2 time steps since in the first step X could be executed, and Y could be executed in the next time step (since it requires X to complete first). Now, suppose the following dependencies exist between the tasks T1 – T8: T1 - T2 T2 - T3 T3 - T6 T2 - T4 T4 - T7 T2 - T5 T5 - T8 What is the minimum number of time steps required to execute these 8 tasks on a 2 processor machine and a 4 processor machine? a)4 2 b)5 2 c)5 4 d)6 2 -- 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. -- ___ Please do not print this e-mail until urgent requirement. Go Green!! Save Papers = Save Trees -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] C easy doubt
a+1 is valid . Basically a is the address of the entire array so, arr+1 will point beyond this array. a is the base address and a+1 will point to the next element in the array. On Mon, Aug 8, 2011 at 7:59 PM, Brijesh Upadhyay brijeshupadhyay...@gmail.com wrote: int main() { int a[3][4]={1,2,3,4,5,6,7,8,9,10,11,12}; printf(%u %u %u,a, a+1,a+1); getch(); } how a+1 is valid..?? please explain -- Regards, Brijesh Upadhyay CSE , final year. Thapar University -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] C easy doubt
Oh Sorry errata!!! in the second sentence it is a+1 which will point to next element in the array. On Mon, Aug 8, 2011 at 8:02 PM, payel roy smithpa...@gmail.com wrote: Yes it is... a+1 will point to starting address of a + 12 * size of int. byte. On 8 August 2011 19:59, Brijesh Upadhyay brijeshupadhyay...@gmail.comwrote: int main() { int a[3][4]={1,2,3,4,5,6,7,8,9,10,11,12}; printf(%u %u %u,a, a+1,a+1); getch(); } how a+1 is valid..?? please explain -- Regards, Brijesh Upadhyay CSE , final year. Thapar University -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] amazon
b:Shell sort On Sun, Aug 7, 2011 at 10:56 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: 1.what is the best sorting method for almost sorted array? a.quicksort c.hapsort c.shell sort d.bubble -- Regards, Kamakshi kamakshi...@gmail.com -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] wht does this error means
I think you copied and pasted the code from some resource and then tried to compile it. The error shown above are usually smart quotes they are shown usually when there is problem with the double quotation marks in the program (printf) So to remove that error, remove the double quotation marks in the program and then type again the double quotation marks. They are usually the left and right quotation marks replace them with normal double quotations. Hope this helps!!! On Sat, Aug 6, 2011 at 11:27 PM, jagrati verma jagrativermamn...@gmail.comwrote: error: stray ‘\342’ in program -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Re: sizeof structure
So Basically I drew this conclusion ( Correct if I am wrong) On Gcc char 1 byte but allocates 4 bytes padding 3 bytes for performance improvement. 4 double 8 bytes allocates 8 bytes ( multiple of 4 so no probs no padding) 8 int 4 bytes allocates 4 bytes. 4 - Total 16 bytes On dev c++ and many other compilers char 1 byte allocates 8 bytes padding 7 bytes8 double 8 bytes allocates 8 bytes 8 int 4 bytes allocates 8 bytes padding 4 bytes 8 Total 24 bytes This behavior occurs basically because of activation records the compilers use to store the variables in memory with gcc compiler takes 4 byte boundaries as activation records and dev c++ and other compilers taking activation record boundaries to be 8 bytes. Hope this is clear !! On Sat, Aug 6, 2011 at 11:28 PM, vikas singh shyguy1...@gmail.com wrote: @sandeep I have executed it on gcc, it's showing 16 bytes(earlier post, the address too) ... I'm sure now, this thing is PURILY compiler dependent.. and it's your code buddy, not mine. ;) On Sat, Aug 6, 2011 at 7:37 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote: i hav executed ur code on dev c++.. i m getting correct out put as 24. when i hav executed ur code on turbo version it shows 11 ,i.e it is doing no padding at all.. On Sat, Aug 6, 2011 at 7:21 PM, vikas singh shyguy1...@gmail.com wrote: @sandeep size = 16 address=3220095484 size = 16 address=3220598412 size = 16 address=3214020060 size = 16 address=3214400060 size = 16 address=3216088732 size = 16 address=3220983548 size = 16 address=3219062412 size = 16 address=3214817228 this is my continuous execution of your code struct node { char c; double d; int s; }; int main(){ struct node a; struct node *p; p=a; printf(size = %d \t address=%u, sizeof(a), p); } I don't know why you said 24 in the thread.. is it compiler dependent ?? -- Thanks and Regards VIKAS SINGH MCA- final year NIT DURGAPUR email: vikas.singh1...@gmail.com shyguy1...@gmail.com http://smrit.wordpress.com -- 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 and Regards VIKAS SINGH MCA- final year NIT DURGAPUR email: vikas.singh1...@gmail.com shyguy1...@gmail.com http://smrit.wordpress.com -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] address calculation
@aditi : I Think the output depends on whether it is row major or column major representation in memory . Does he row amjor or column On Sun, Aug 7, 2011 at 12:19 AM, aditi garg aditi.garg.6...@gmail.comwrote: oh @ akshay y ru doing 10x4??? 10 is the no of rows not the columns so it shud be 15x3+4...and by multiplying by 4(in 10x4) ur taking it to the 5th row ie A[4][4] its only A[3][4]... i hope its clear now On Sun, Aug 7, 2011 at 12:14 AM, akshay khatri akshaykhatri...@gmail.comwrote: On 6 August 2011 23:56, aditi garg aditi.garg.6...@gmail.com wrote: @akshay: what i meant ws suppose the array strted from in decimal...so A[3][4] wud be at 0049 and B[3][4] will be at 0196 convert dese 2 values to hex it gives 31 and C4 respectively...now base address is 1000 and 2000 instead if so add the base address and u get the ans 1031 and 20C4...i hope its clear now... I still don't get how you got the figures of 49 and 196 I calculated as follows A[3][4] = 10x4 + 4 = 44 bytes B[3][4] = (10x4 + 4 )x4 = 176 On Sat, Aug 6, 2011 at 11:49 PM, akshay khatri akshaykhatri...@gmail.com wrote: On 6 August 2011 23:40, aditi garg aditi.garg.6...@gmail.com wrote: A[3][4] wud be in the 4th row...so strtung address of 4th row wud be 46..and thn 4th element wud be at 49...similarly fr B 180 fr the frst 3 rows + 16 fr the 4th elemnet so 196 How does it start from 46 and 180 ? as per my knowledge, 0x1000 = 4096 and 0x2000 is 8192 On Sat, Aug 6, 2011 at 11:37 PM, akshay khatri akshaykhatri...@gmail.com wrote: how is that 49 bytes and 196 bytes shouldn't it be 44 and 176 bytes respectively On 6 August 2011 23:26, Ram Chauhan rb.chau...@gmail.com wrote: 1049 and 1098 On Sat, Aug 6, 2011 at 11:09 PM, aditi garg aditi.garg.6...@gmail.com wrote: CHAR A[10][15] AND INT B[10][15] IS DEFINED WHAT'S THE ADDRESS OF A[3][4] AND B[3][4] IF ADDRESS OF A IS OX1000 AND B IS 0X2000 -- 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. -- 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. -- Aditi Garg Undergraduate Student Electronics Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi -- 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. -- Aditi Garg Undergraduate Student Electronics Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi -- 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. -- Aditi Garg Undergraduate Student Electronics Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to
Re: [algogeeks] Reverse Bits
@mithun : Thanks On Fri, Aug 5, 2011 at 6:37 PM, mithun bs mithun...@gmail.com wrote: Hi Rajeev, I follow similar approach. The basic logic is swap bits of a pair, then swap nibbles(2 bits) and then swap (4bits), 8bits and go on. So for ex. 0110 1101 1100 0101 In first step, I swap bits of each pair. So this becomes, Input - 0110 1101 1100 0101 output- 1001 1110 1100 1010 In second step, I swap 2bits Input - 1001 1110 1100 1010 output-0110 1011 0011 1010 I swap 4 bits now Input - 0110 1011 0011 1010 output-1011 0110 1010 0011 Now I swap 8bits Input - 1011 0110 1010 0011 output-1010 0011 1011 0110 So, now we have the bits in reverse order. First step I do this way x = ((x | 0x) 2) | (x2) | 0x; Next step similarly x = ((x | 0x) 4) | (x4) | 0x; This is the logic. Your code does the reverse way. Regards, Mithun On Fri, Aug 5, 2011 at 6:04 PM, rShetty rajeevr...@gmail.com wrote: This is the code to reverse the bits in an unsigned integer . Could anyone please explain the logic of this approach ? Thank You !! #define reverse(x) \ (x=x16|(0xx)16, \ x=(0xff00ff00x)8|(0x00ff00ffx)8, \ x=(0xf0f0f0f0x)4|(0x0f0f0f0fx)4, \ x=(0xx)2|(0xx)2, \ x=(0xx)1|(0xx)1) -- 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. -- Mithun.B.S M:9916775380 -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] oracle question
@naveen : Library calls inturn call system calls . System calls are basically call to specific functions provided in the kernel which does some predefined activities . Library calls inturn call the system calls of the kernel to achieve a specific job . For example malloc() function is built on top of sbrk() system call. malloc is library function which inturn calls the srbk() system call. Hope this is clear . On Wed, Aug 3, 2011 at 7:27 PM, naveen ms naveenms...@gmail.com wrote: what is the difference b/w system call and library call. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] oracle question
@aditi : Operating systems by Andrew S Tanenbaum is the classic book for Operating systems. On Wed, Aug 3, 2011 at 11:20 PM, aditi garg aditi.garg.6...@gmail.comwrote: @Rajeev: could u suggest some source to learn OS quickly...I dint have it as my subjct,bt i need it fr placements On Wed, Aug 3, 2011 at 11:18 PM, coder dumca coder.du...@gmail.comwrote: system call causes a mode switch mode changes fron user to kernal. On Wed, Aug 3, 2011 at 7:07 AM, naveen ms naveenms...@gmail.com wrote: @rajeev and sourabh:..thanks a lot;...:) -- 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. -- Aditi Garg Undergraduate Student Electronics Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Doubt
Since you are maintaining two different data structures ,one for the old tree and the other for new tree . I think this isn't considered in-place algorithm . The algorithm to be in-place should not use any additional data structures . Correct me if I am wrong . On Thu, Aug 4, 2011 at 2:52 AM, Gaurav Popli abeygau...@gmail.com wrote: good quesn.i also want to knowjust in case On Thu, Aug 4, 2011 at 2:50 AM, Anurag Narain anuragnar...@gmail.com wrote: suppose there is a binary tree and i am creating another tree which is same as the previous one. but while creating the new tree i am freeing the nodes of my old tree(i.e., i create one node in new tree and delete the corresponding node in old tree and continue the process till the new tree is formed which is same as old tree but the old tree now does not exist) would this conversion be considered in-place?? -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Feedback of the book!!!!!!!
Awesome Book ,for interviews : Covers wide range of interview questions . On Mon, Aug 1, 2011 at 12:23 PM, AMAN AGARWAL mnnit.a...@gmail.com wrote: Hi, I am planning to buy a book cracking the coding interview by Gayle Laakmann. Please give your feedbacks. -- AMAN AGARWAL Success is not final, Failure is not fatal: It is the courage to continue that counts! -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] C-Question
Becaus eof Bitwise and 0110 (6) 0001 0010 (10) 0010 (2) So 00 0 01 0 10 0 11 1 On Mon, Aug 1, 2011 at 3:31 PM, Vijay Khandar vijaykhand...@gmail.comwrote: main() { int a=6,b=10,x; x=ab; printf(%d,x); } O/P=2 Plz any one explain me ,how its come -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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]
scanf returns the number of characters scanned as input,in here the scanf statement gets placed at getchar and hence since it accepts 1 character 'c' will print the value 1. #ifdef getchar checks for whether getchar is defined if defined it undefines it as #undef else it #define getchar as scanf // this statement actually runs . hence the output is 1 , characters accepted by the scanf . Hope you understood On Sun, Jul 31, 2011 at 12:00 PM, SHIVAM AGRAWAL shivi...@gmail.com wrote: i got it On Sun, Jul 31, 2011 at 11:08 AM, SHIVAM AGRAWAL shivi...@gmail.comwrote: plz xplain y it is printing zero ...means how dis prgrm is wrkng step by step On Sun, Jul 31, 2011 at 11:03 AM, rajeev bharshetty rajeevr...@gmail.com wrote: *#includestdio.h* *#ifdef getchar* *#undef getchar* *#else* *#define getchar scanf(%c,ch);* *#endif* *main()* *{* *char ch;* *int c;* *c=getchar;* *printf(%d,c);* *}* This above code works as expected On Sun, Jul 31, 2011 at 11:02 AM, rajeev bharshetty rajeevr...@gmail.com wrote: Above Program is showing error on gcc compiler *ms52.c: In function ‘main’:* *ms52.c:11:19: error: expected expression before ‘)’ token* Check the code ... On Sun, Jul 31, 2011 at 10:59 AM, SHIVAM AGRAWAL shivi...@gmail.comwrote: can any xplain me d output and working of dis code... #includestdio.h #ifdef getchar #undef getchar #else #define getchar scanf(%c,ch); #endif main() { char ch; int c; c=getchar(); printf(%d,c); } -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- Regards Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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]
#includestdio.h int main() { int i,j,n; printf(\n Enter the value of n); scanf(%d,n); for(i=1;i=n;i++) { for(j=1;j=n-i;j++) printf( ); for(j=1;j=i;j++) printf(*); printf(\n); } for(i=1;i=n;i++) { for(j=1;j=i;j++) printf( ); for(j=1;j=n-i;j++) printf(*); printf(\n); } return 0; } On Sun, Jul 31, 2011 at 2:37 PM, Someshwar Chandrasekaran somseka...@gmail.com wrote: On Sun, Jul 31, 2011 at 2:20 PM, priyanka raju priyark...@gmail.com wrote: write a c program to print the following * * * * * * * * * What complexity is expected? Regards, B.C.Someshwar -- 'Talk sense to a fool and he calls you foolish.' - Euripides My Blog: somsekaran.wordpress.com -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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]
a Slight change to the previous program Here it goes #includestdio.h int main() { int i,j,n; printf(\n Enter the value of n); scanf(%d,n); for(i=1;i=n;i++) { for(j=1;j=n-i;j++) printf( ); for(j=1;j=i;j++) printf( *); printf(\n); } for(i=1;i=n;i++) { for(j=1;j=i;j++) printf( ); for(j=1;j=(n-i);j++) printf( *); printf(\n); } return 0; } o/p * * * * * * * * * * * * * * * * On Sun, Jul 31, 2011 at 3:41 PM, rajeev bharshetty rajeevr...@gmail.comwrote: #includestdio.h int main() { int i,j,n; printf(\n Enter the value of n); scanf(%d,n); for(i=1;i=n;i++) { for(j=1;j=n-i;j++) printf( ); for(j=1;j=i;j++) printf(*); printf(\n); } for(i=1;i=n;i++) { for(j=1;j=i;j++) printf( ); for(j=1;j=n-i;j++) printf(*); printf(\n); } return 0; } On Sun, Jul 31, 2011 at 2:37 PM, Someshwar Chandrasekaran somseka...@gmail.com wrote: On Sun, Jul 31, 2011 at 2:20 PM, priyanka raju priyark...@gmail.com wrote: write a c program to print the following * * * * * * * * * What complexity is expected? Regards, B.C.Someshwar -- 'Talk sense to a fool and he calls you foolish.' - Euripides My Blog: somsekaran.wordpress.com -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- Regards Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] random generation
*#includestdio.h* * * *int main()* *{* * * *int x,a,b,i,n;* *printf(\n Enter the value of n);* *scanf(%d,n);* *printf(\n Enter Psoitive integer a);* *scanf(%d,a);* *printf(\n Enter the positisve integer b);* *scanf(%d,b);* *for(i=1;i=15;i++)* *{* * n= (a*n + b);* * printf(%d\n,n);* *}* *return 0;* * * * }* Random code generator ... Correct me if i am wrong thanks On Sun, Jul 31, 2011 at 3:19 PM, Someshwar Chandrasekaran somseka...@gmail.com wrote: On Sun, Jul 31, 2011 at 3:09 PM, Puneet Gautam puneet.nsi...@gmail.com wrote: Can we write a code to generate random numbers without using rand function..? Pls help me on this!! How about operating on some garbage value? Regards, B.C.Someshwar -- 'Talk sense to a fool and he calls you foolish.' - Euripides My Blog: somsekaran.wordpress.com -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Bugs in a program
http://www.softwaretestinghelp.com/priority-and-severity/ On Sun, Jul 31, 2011 at 3:02 PM, Puneet Gautam puneet.nsi...@gmail.comwrote: What is meant by 'priority' and 'severity' of a bug..? -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Pointer
*#includestdio.h* *int main()* *{* *int i=10;* *int j=20;* *int *a,*b;* *a =i;* *b=j;* *printf(before%d%d\n,*a,*b);* **a^=*b;* **b^=*a;* **a^=*b;* *printf(after%d%d,*a,*b);* *return 0;* *}* * * *This swaps pointers * On Sun, Jul 31, 2011 at 7:15 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote: How to swap two pointers without using a temporary pointer ? -- Nikhil Gupta Senior Co-ordinator, Publicity CSI, NSIT Students' Branch NSIT, New Delhi, India -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Pointer
@Nikhil : What do you want to convey ?? On Sun, Jul 31, 2011 at 7:32 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote: http://ideone.com/YHxVe @Rajeev, check this. On Sun, Jul 31, 2011 at 7:28 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote: Whats the logic behind **a^=*b;* **b^=*a;* **a^=*b;* ?? On Sun, Jul 31, 2011 at 7:19 PM, rajeev bharshetty rajeevr...@gmail.comwrote: *#includestdio.h* *int main()* *{* *int i=10;* *int j=20;* *int *a,*b;* *a =i;* *b=j;* *printf(before%d%d\n,*a,*b);* **a^=*b;* **b^=*a;* **a^=*b;* *printf(after%d%d,*a,*b);* *return 0;* *}* * * *This swaps pointers * On Sun, Jul 31, 2011 at 7:15 PM, Nikhil Gupta nikhilgupta2...@gmail.com wrote: How to swap two pointers without using a temporary pointer ? -- Nikhil Gupta Senior Co-ordinator, Publicity CSI, NSIT Students' Branch NSIT, New Delhi, India -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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. -- Nikhil Gupta Senior Co-ordinator, Publicity CSI, NSIT Students' Branch NSIT, New Delhi, India -- Nikhil Gupta Senior Co-ordinator, Publicity CSI, NSIT Students' Branch NSIT, New Delhi, India -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] problem of structur
*#includestdio.h* * * * * *struct emp* *{* *char name[20];* *int age;* *};* *f(struct emp ee)* *{* *printf(%s ...%d\n,ee.name,ee.age);* *}* *main()* *{* *struct emp e={qwe,12};* *f(e);* *}* This above code works fine on gcc 4.3.2 output : qwe ...12 On Sun, Jul 31, 2011 at 8:38 PM, Anika Jain anika.jai...@gmail.com wrote: In C default return type is int and as you havent given return type for f function compiler assumes it as int but u r not returning any integer from that function On Sun, Jul 31, 2011 at 8:33 PM, Rajesh Kumar testalgori...@gmail.comwrote: What is Error in This program??plzrply #includestdio.h f(struct epm); struct emp { char name[20]; int age; }; main() { struct emp e={qwe,12}; f(e); } f(struct emp ee) { printf(%s ...%d\n,ee.name,ee.age); } -- Rajesh Kumar -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] 32 bit?
If pointer size is 4bytes then it is 32 bit machine and if 8 bytes it is 64 bit On Sat, Jul 30, 2011 at 11:51 AM, Nikhil Gupta nikhilgupta2...@gmail.comwrote: How do you find out if a machine is 32 bit or 64 bit? I was thinking since the size of pointer variable is different in the 2 configurations, we can declare a pointer and use sizeof() Will that work? Any other suggestions? -- Nikhil 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. -- Regards Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] FB intern
@amol and saurabh : How exactly is that formula derived for this problem ? I need to know the method to evaluate such problems in the feature . Thank you On Sat, Jul 30, 2011 at 1:43 PM, saurabh singh saurab...@gmail.com wrote: Thanx mate...You rock.:) On Sat, Jul 30, 2011 at 1:40 PM, Amol Sharma amolsharm...@gmail.comwrote: i think saurabh you wanted to say this -- x^n=pow(x^n/2)*pow(x^n/2)*(x^(*n*mod2)) -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad On Sat, Jul 30, 2011 at 1:10 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote: use divide and conquer . logm complexity . . . On Sat, Jul 30, 2011 at 1:09 PM, saurabh singh saurab...@gmail.comwrote: o(log n) x^n=pow(x^n/2)*pow(x^n/2)*(x^mod2) the base case pow(x,1)=x pow(x,0)=1 On Sat, Jul 30, 2011 at 1:02 PM, arvind kumar arvindk...@gmail.comwrote: Find the least time complexity algorithm(most efficient algo) to find x^m(x to the power of m)..Facebok intern interview question! -- 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. -- Saurabh Singh B.Tech (Computer Science) MNNIT ALLAHABAD -- 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. -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- 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. -- Saurabh Singh B.Tech (Computer Science) MNNIT ALLAHABAD -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Re: Amazon
@amir : Could you please share the questions they asked?? Thanks On Sat, Jul 30, 2011 at 4:52 PM, Amir pkpat...@gmail.com wrote: In Amazon First Round all about Linux and Open Source Commands and Usage... -- 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/-/su20uc4k8ZcJ. 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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]
Above Program is showing error on gcc compiler *ms52.c: In function ‘main’:* *ms52.c:11:19: error: expected expression before ‘)’ token* Check the code ... On Sun, Jul 31, 2011 at 10:59 AM, SHIVAM AGRAWAL shivi...@gmail.com wrote: can any xplain me d output and working of dis code... #includestdio.h #ifdef getchar #undef getchar #else #define getchar scanf(%c,ch); #endif main() { char ch; int c; c=getchar(); printf(%d,c); } -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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]
*#includestdio.h* *#ifdef getchar* *#undef getchar* *#else* *#define getchar scanf(%c,ch);* *#endif* *main()* *{* *char ch;* *int c;* *c=getchar;* *printf(%d,c);* *}* This above code works as expected On Sun, Jul 31, 2011 at 11:02 AM, rajeev bharshetty rajeevr...@gmail.comwrote: Above Program is showing error on gcc compiler *ms52.c: In function ‘main’:* *ms52.c:11:19: error: expected expression before ‘)’ token* Check the code ... On Sun, Jul 31, 2011 at 10:59 AM, SHIVAM AGRAWAL shivi...@gmail.comwrote: can any xplain me d output and working of dis code... #includestdio.h #ifdef getchar #undef getchar #else #define getchar scanf(%c,ch); #endif main() { char ch; int c; c=getchar(); printf(%d,c); } -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- Regards Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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]
B Trees data structures are optimal for such problems. These algorithms help to access large amount of data which we cannot fit into main memory . On Fri, Jul 29, 2011 at 2:58 PM, Puneet Gautam puneet.nsi...@gmail.comwrote: If u have to sort a large amount of data,but the memory space is insufficient for the same...How would u sort the data..? Reply asap everyone.. Thanks in advance...! -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] DS representation.
You can use a Hash map which maps the coefficients of the equation and their exponents. Is this feasible ?? On Fri, Jul 29, 2011 at 3:10 PM, sunny agrawal sunny816.i...@gmail.comwrote: Array that that stores A,B,C,D,E. it looks like u r on some telephonic interview :P On Fri, Jul 29, 2011 at 3:06 PM, Puneet Gautam puneet.nsi...@gmail.comwrote: Hi, pls tell me which data structure has following representation:: A+Bx+Cx(^2)+Dx(^3)+...+Nx(^n-1).?? reply asap...!! -- 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. -- Sunny Aggrawal B-Tech IV year,CSI Indian Institute Of Technology,Roorkee -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Doubt
~ does bitwise not on the operand . It simply inverts all the bits . On Fri, Jul 29, 2011 at 7:09 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote: And what does ~ operator do? On Fri, Jul 29, 2011 at 5:59 PM, aditi garg aditi.garg.6...@gmail.comwrote: right shift.^ Xor, and,| OR operators... the statement means u r anding the bits of num wid the bits in the hexadecimal number x000FF and thn right shifting the bits by 0 number of times( effectively in this case u wont be shifting) On Fri, Jul 29, 2011 at 5:50 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote: What is meant by the statement : byte0 = (num x00FF) 0 And what is meant by the operators , ^ , , | and how are they used? -- Nikhil Gupta Senior Co-ordinator, Publicity CSI, NSIT Students' Branch NSIT, New Delhi, India -- 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. -- Aditi Garg Undergraduate Student Electronics Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi -- 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. -- Nikhil Gupta Senior Co-ordinator, Publicity CSI, NSIT Students' Branch NSIT, New Delhi, India -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] problem at line number 12
#includestdio.h void main() { int n[3][3]= { 2,4,3, 6,8,5, 3,5,1 }; int i,*ptr; ptr= n; for(i=0;i=8;i++) printf(\n%d,*(ptr+i)); } In gcc 4.3.2 no error ,it is just showing a warning as ms50.c: In function ‘main’: ms50.c:11:8: warning: assignment from incompatible pointer type change the statement as ptr = n[0] warning vanishes On Fri, Jul 29, 2011 at 11:17 PM, Arshad Alam alam3...@gmail.com wrote: what's the problem with line number 12? 1#includestdio.h 2#includeconio.h 3void main() 4 { 5clrscr(); 6int n[3][3]= { 7 2,4,3, 8 6,8,5, 9 3,5,1 10 }; 11 int i,*ptr; 12 ptr=n; 13 for(i=0;i=8;i++) 14printf(\n%d,*(ptr+i)); 15 getch(); } -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Re: MS question
Test cases for MSN Search Engine 1 : Check for auto completion feature (The auto completion based on the prefix should provide suggestions for the most searched keyword with that prefix) . 2 : The spelling correction feature which shows as to what the user actually meant. This should be highly relevant to the input query. 3 : Speed of page searches is done using usually caching the pages , check for that required speed with various benchmark tests. 4 : then you can test for the protocols , the maximum load the server can bear by stress testing it. 5 :The results returned usually should be highly relevant (test for that) , the count of results returned should be validated . 6 : If the search engine supports various languages , then it should be tested on various languages . 7 :You can test for working of various buttons on the search web page .Test various links on the page. 8 : Test for the validity of GET or POST requests sent by the search engine . 9 :Check for validity of links on the results page . check various links are working or not through a bot. 10 : The Validity of Page rank algorithm used can also be tested for various search queries.The machine learning object fitted in search engine should be tested with various kinds of inputs to make it learn the behavior . On Fri, Jul 29, 2011 at 11:13 PM, vaibhav agarwal vibhu.bitspil...@gmail.com wrote: what has palindrome to do with this? On Mon, Jul 18, 2011 at 1:11 AM, swetha rahul swetharahu...@gmail.comwrote: Thanks everyone!! On Sun, Jul 17, 2011 at 10:56 PM, ankit sambyal ankitsamb...@gmail.comwrote: Check for case senstivity also: eg: Madam and madam both are palindromes. Also for clarify with the interviewer whether whitespace and punctuation can be ignored. eg: is the following string a palindrome or not: A man, a plan, a canal, Panama And check for this condition accordingly -- 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. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] problem at line number 12
@ankur :which compiler are u using?? On Fri, Jul 29, 2011 at 11:39 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote: @rajeev: your code gives compilation error. On Fri, Jul 29, 2011 at 11:39 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote: no , n[0] is *(n+0) so actually n is being dereferenced here .Check the basci diff p is a pointer , but n is a pointer to a pointer. On Fri, Jul 29, 2011 at 11:34 PM, Arshad Alam alam3...@gmail.com wrote: wow great... but why it is so yaar? ptr=n and ptr=n[0] is same na? On Fri, Jul 29, 2011 at 11:27 PM, rajeev bharshetty rajeevr...@gmail.com wrote: #includestdio.h void main() { int n[3][3]= { 2,4,3, 6,8,5, 3,5,1 }; int i,*ptr; ptr= n; for(i=0;i=8;i++) printf(\n%d,*(ptr+i)); } In gcc 4.3.2 no error ,it is just showing a warning as ms50.c: In function ‘main’: ms50.c:11:8: warning: assignment from incompatible pointer type change the statement as ptr = n[0] warning vanishes On Fri, Jul 29, 2011 at 11:17 PM, Arshad Alam alam3...@gmail.comwrote: what's the problem with line number 12? 1#includestdio.h 2#includeconio.h 3void main() 4 { 5clrscr(); 6int n[3][3]= { 7 2,4,3, 8 6,8,5, 9 3,5,1 10 }; 11 int i,*ptr; 12 ptr=n; 13 for(i=0;i=8;i++) 14printf(\n%d,*(ptr+i)); 15 getch(); } -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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. -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] problem at line number 12
@ankur: But the same above code wont show any error on my gcc 4.3.2 running on Open Suse 11.4 On Fri, Jul 29, 2011 at 11:48 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote: http://ideone.com/OaCDR On Fri, Jul 29, 2011 at 11:45 PM, rajeev bharshetty rajeevr...@gmail.comwrote: @ankur :which compiler are u using?? On Fri, Jul 29, 2011 at 11:39 PM, Ankur Khurana ankur.kkhur...@gmail.com wrote: @rajeev: your code gives compilation error. On Fri, Jul 29, 2011 at 11:39 PM, Ankur Khurana ankur.kkhur...@gmail.com wrote: no , n[0] is *(n+0) so actually n is being dereferenced here .Check the basci diff p is a pointer , but n is a pointer to a pointer. On Fri, Jul 29, 2011 at 11:34 PM, Arshad Alam alam3...@gmail.comwrote: wow great... but why it is so yaar? ptr=n and ptr=n[0] is same na? On Fri, Jul 29, 2011 at 11:27 PM, rajeev bharshetty rajeevr...@gmail.com wrote: #includestdio.h void main() { int n[3][3]= { 2,4,3, 6,8,5, 3,5,1 }; int i,*ptr; ptr= n; for(i=0;i=8;i++) printf(\n%d,*(ptr+i)); } In gcc 4.3.2 no error ,it is just showing a warning as ms50.c: In function ‘main’: ms50.c:11:8: warning: assignment from incompatible pointer type change the statement as ptr = n[0] warning vanishes On Fri, Jul 29, 2011 at 11:17 PM, Arshad Alam alam3...@gmail.comwrote: what's the problem with line number 12? 1#includestdio.h 2#includeconio.h 3void main() 4 { 5clrscr(); 6int n[3][3]= { 7 2,4,3, 8 6,8,5, 9 3,5,1 10 }; 11 int i,*ptr; 12 ptr=n; 13 for(i=0;i=8;i++) 14printf(\n%d,*(ptr+i)); 15 getch(); } -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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. -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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. -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] problem at line number 12
@ankur : Dude I think you compiled in ideone as C++ language but it is C :) http://ideone.com/HZhHu On Fri, Jul 29, 2011 at 11:51 PM, rajeev bharshetty rajeevr...@gmail.comwrote: @ankur: But the same above code wont show any error on my gcc 4.3.2 running on Open Suse 11.4 On Fri, Jul 29, 2011 at 11:48 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote: http://ideone.com/OaCDR On Fri, Jul 29, 2011 at 11:45 PM, rajeev bharshetty rajeevr...@gmail.com wrote: @ankur :which compiler are u using?? On Fri, Jul 29, 2011 at 11:39 PM, Ankur Khurana ankur.kkhur...@gmail.com wrote: @rajeev: your code gives compilation error. On Fri, Jul 29, 2011 at 11:39 PM, Ankur Khurana ankur.kkhur...@gmail.com wrote: no , n[0] is *(n+0) so actually n is being dereferenced here .Check the basci diff p is a pointer , but n is a pointer to a pointer. On Fri, Jul 29, 2011 at 11:34 PM, Arshad Alam alam3...@gmail.comwrote: wow great... but why it is so yaar? ptr=n and ptr=n[0] is same na? On Fri, Jul 29, 2011 at 11:27 PM, rajeev bharshetty rajeevr...@gmail.com wrote: #includestdio.h void main() { int n[3][3]= { 2,4,3, 6,8,5, 3,5,1 }; int i,*ptr; ptr= n; for(i=0;i=8;i++) printf(\n%d,*(ptr+i)); } In gcc 4.3.2 no error ,it is just showing a warning as ms50.c: In function ‘main’: ms50.c:11:8: warning: assignment from incompatible pointer type change the statement as ptr = n[0] warning vanishes On Fri, Jul 29, 2011 at 11:17 PM, Arshad Alam alam3...@gmail.comwrote: what's the problem with line number 12? 1#includestdio.h 2#includeconio.h 3void main() 4 { 5clrscr(); 6int n[3][3]= { 7 2,4,3, 8 6,8,5, 9 3,5,1 10 }; 11 int i,*ptr; 12 ptr=n; 13 for(i=0;i=8;i++) 14printf(\n%d,*(ptr+i)); 15 getch(); } -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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. -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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. -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- Regards Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- You received this message because you are subscribed
Re: [algogeeks] Re: Testcases
@hary are the conditions same for both acute and obtuse triangles as you mentioned ??? On Sat, Jul 30, 2011 at 12:46 AM, hary rathor harry.rat...@gmail.comwrote: if(c^2 a^2+b^2) acute angle if(c^2 =a^2+b^2) right angle if(c^2 a^2+b^2) obtuse angle NOT : ^ is used for power operation -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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.
[algogeeks] rajeev bharshetty wants to chat
--- rajeev bharshetty wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-fa8b2f68fb-7b53be141f-z1723Z4LtlasPTsvQH98EBXXl70 You'll need to click this link to be able to chat with rajeev bharshetty. To get Gmail - a free email account from Google with over 2,800 megabytes of storage - and chat with rajeev bharshetty, visit: http://mail.google.com/mail/a-fa8b2f68fb-7b53be141f-z1723Z4LtlasPTsvQH98EBXXl70 Gmail offers: - Instant messaging right inside Gmail - Powerful spam protection - Built-in search for finding your messages and a helpful way of organizing emails into conversations - No pop-up ads or untargeted banners - just text ads and related information that are relevant to the content of your messages All this, and its yours for free. But wait, there's more! By opening a Gmail account, you also get access to Google Talk, Google's instant messaging service: http://www.google.com/talk/ Google Talk offers: - Web-based chat that you can use anywhere, without a download - A contact list that's synchronized with your Gmail account - Free, high quality PC-to-PC voice calls when you download the Google Talk client We're working hard to add new features and make improvements, so we might also ask for your comments and suggestions periodically. We appreciate your help in making our products even better! Thanks, The Google Team To learn more about Gmail and Google Talk, visit: http://mail.google.com/mail/help/about.html http://www.google.com/talk/about.html (If clicking the URLs in this message does not work, copy and paste them into the address bar of your browser). -- 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] Re: C output
No error in gcc 4.3.2 too On Thu, Jul 28, 2011 at 2:47 PM, Rohit Srivastava access2ro...@gmail.comwrote: no error in dev c++. On Thu, Jul 28, 2011 at 2:43 PM, Piyush Kapoor pkjee2...@gmail.comwrote: It is not showing compiler error on Codeblocks on my machine. On Thu, Jul 28, 2011 at 2:26 PM, prabhat prabhat0...@gmail.com wrote: i think there will be warning due to inner structure is not declaring variable. Inner structure must be like: struct yy { char s; struct xx *p; }a; On Jul 27, 9:22 pm, Aman Goyal aman.goya...@gmail.com wrote: #include‹stdio.h› main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; } ouput: compiler error. Any logical reasons? -- 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,* *Piyush Kapoor,* *CSE-IT-BHU* -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Novell - Technical Interview
1 )System map in Linux is a Symbol table used by the kernel. Mapping of symbol names and addresses. 2 ) IS it /usr/src/linux ??? On Fri, Jul 29, 2011 at 8:10 AM, Reynald reynaldsus...@gmail.com wrote: 1. What is a System Map file in Linux? Why do we need it? 2. Mention the file name which is a symbolic link to the system kernel. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Re: MS c output ques
@aditi : What is the string input you gave.?? it depends on that If you have entered the string such as illeana then string illeana matches at the first location , so it prints the previous value copied into the str i.e siva . Hope you understood . On Wed, Jul 27, 2011 at 1:24 AM, aditi garg aditi.garg.6...@gmail.comwrote: @rajeev i ran dis code int main() { char str[80]; strcpy(str,siva); scanf(%[^india],str); printf(%s,str); return 0; } and i got the output as siva...instead of s as expected...can u plz point out the error On Tue, Jul 26, 2011 at 11:21 PM, siva viknesh sivavikne...@gmail.comwrote: @both...fantastic explanation...thanks :) On Jul 26, 10:34 pm, rajeev bharshetty rajeevr...@gmail.com wrote: So if the input is gujarat it scans gujarat to find the first character in gujarat which is also present in india . So the character in gujarat is a so it will stop on encountering a and prints the string scanned till then. If the input is india , it matches at first location so it prints the contents of str which is junk. Now consider rajeev it will print r because of a at second position. and for siva it will print s try it out. Hope you understood the concept. On Tue, Jul 26, 2011 at 10:54 PM, kc Liyan kcli...@gmail.com wrote: if U given input as gujarat the scanf will accept inputs as char's.but there s an ^ which means ex-or operation should be performed regular check of existance of any char of {india}... untill it get's the existance then it will stop the input getting..finally it prints as guj On 7/26/11, siva viknesh sivavikne...@gmail.com wrote: main() { char str[80]; strcpy(str,junk); scanf(%[^india],str); printf(%s,str); } ...input is gujarat.output is guj.plz explain how? -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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. -- Aditi Garg Undergraduate Student Electronics Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi 9718388816 -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] C-question
The output is 10101101 consider it to be f(173) - f(86) - f(43) - f(21) - f(10) - f(5) - f(2) - f(1) 1 0 110 1 01 Hope you get the recursion there . On Wed, Jul 27, 2011 at 11:19 PM, Vijay Khandar vijaykhand...@gmail.comwrote: #includestdio.h #includeconio.h int f(int n) { if(n=1) { printf( %d,n); } else { f(n/2); printf( %d,n%2); } } void main() { clrscr(); f(173); getch(); } o/p-1 0 1 0 1 1 0 1 but i m getting 1 0 1 1 0 1 0 1 plz explain me... -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] DE Shaw - Data Structure Section Qn
Hash Table with Bucket , made of linked list . At most if all n values hash to same bucket then at worst case we must traverse n linked list nodes to find the element. Hope it is clear On Wed, Jul 27, 2011 at 11:59 PM, Reynald reynaldsus...@gmail.com wrote: Which of the following data structure do better job (has lesser time complexity) at searching elements that has a worst-case time complexity of O(n)? Do not account for the cost of building the Data structure in searching cost. a) Linked list with element sorted by value b) Binary tree with no ordering c) Ordered array d) Hast table with bucket, made up of linked list, where linked list have no ordering. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Sparse matrix
To store sparse matrix adjacency lists should be used rather than adjacency matrix ... On Thu, Jul 28, 2011 at 12:03 AM, aditi garg aditi.garg.6...@gmail.comwrote: How wud u store a sparse matrix( whch has elemensts only below or abv the diagonal) in memory...what data structure u wud use and y? -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] how to calculate the complexity
Masters Theorem http://en.wikipedia.org/wiki/Master_theorem On Thu, Jul 28, 2011 at 1:14 AM, NITIN SHARMA coolguyinat...@gmail.comwrote: Can anybody explain the basic steps that how to calculate the complexity of an algo so that i would be able to find complexity of any program -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] Small Doubt
@anika : I just found out that it can be done as int *p = (int *)0x0ff ; *p=4; then 4 gets stored in 0x0ff location . Guys can it be done . Is it Legal ?? On Thu, Jul 28, 2011 at 9:11 AM, Anika Jain anika.jai...@gmail.com wrote: segmentation fault comes when we try to modify or do illegal access to the memory that has not been allocated to us.. the trial to make your variable be at some location of your wish can be done only by int *p=4000; *p=10; but it is illegal coz 4000 memory address is not alloted yet for your program. On Wed, Jul 27, 2011 at 11:26 PM, Puneet Gautam puneet.nsi...@gmail.comwrote: @Anika : pls elaborate the segmentatin part...! On 7/27/11, Anika Jain anika.jai...@gmail.com wrote: no we cant.. coz when we do say int *p=4000; its fine till now.. and if we do *p=10; it is segmentation fault.. On Wed, Jul 27, 2011 at 10:35 PM, rShetty rajeevr...@gmail.com wrote: Usually when I declare a variable it will be stored in memory location with some address . Such as consider I declare int x=10 , it will stored in some address 1003 (say). Now my question is can I control the address being assigned to a variable in C . Say, I want to store x in address in 4000 and not in 1003 defined by the compiler .(Usually this can be done in assembly). Can I do that ? Correct me If i am wrong -- 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. -- 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 Rajeev N B http://www.opensourcemania.co.cc *Winners Don't do Different things , they do things Differently* -- 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] C output.
Replace || by and then j and k will get evaluated. The thing is that i think when the compiler sees a || operator ,if the first operand is true than it wont check for the second.Thus j and k are not getting evaluated. On Tue, Jul 26, 2011 at 2:46 PM, Ankur Khurana ankur.kkhur...@gmail.comwrote: #includeiostream #includestring.h using namespace std; #define N(e) e#e int main() { int i=1,j=2,k=3; int m = i++ || j++ k++; couti j k m; } output :-2 2 3 1 http://www.ideone.com/0sKBr can anybody explain ? why are ++j and ++k are not evaluating even though operator should be evaluated first in order of evaluation. Regards, Ankur -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] Closest as Possible
Sum of any number of elements on the two partitions should be as close as possible. On Tue, Jul 26, 2011 at 6:49 PM, Puneet Gautam puneet.nsi...@gmail.comwrote: @rshetty: do u mean the sum of any no of elements separately in the two partitions be equal to each other..? is that what u mean..? On 7/26/11, rShetty rajeevr...@gmail.com wrote: Problem statement goes as : Consider square root of integers form 1 to 100. Now partition the square roots of integers as being from 1 to 50 and 51 to 100. Now find the sum in the two partitions which is as close as possible or minimum? Give the algorithm ?? and das structures to be used?? -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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]
test or text ?? On Tue, Jul 26, 2011 at 7:52 PM, kavitha nk kavithan...@gmail.com wrote: @saurabh::gets too could be used //BE COOL// kavi -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] Re: Graph Based Problems
DFS or BFS traversal would do to find the relationships in a network of friends . Traverse the graph and appropriately find the nodes (friends) which are at one level below in a graph(tree). As Linkedin does , it finds people connected to you at various levels of depth as people connected at degree 1 and 2 and so. On Tue, Jul 26, 2011 at 6:28 PM, Optimus Prime mageshthegr...@gmail.comwrote: I have no idea on what the 1st question is about as i have never used orkut... 1. Regarding the 2nd one. Maintain a adjacency list for both the user's friends. 2. Move through the friends of user 1 and mark them grey. 3. Move through the user 2 friends and mark them grey if not marked and mark them black if already grey. Finally traverse any 1 user's friends and pick out the black nodes On Jul 26, 4:56 pm, WgpShashank shashank7andr...@gmail.com wrote: if geeks are Really Interested in Application of Graph then why not start from Now :) 1. if you click on any orkut member's name you will notice the relationship for both of you indicating through whom you are interconnected or in certain cases you won't get this path. if you have to propose algorithm what would be the one ... 2 . find the all common friends of between two friends in two friends. Will try to reply asap once it generated good discussion :) Shashank Mani Computer Science Birla Institute of Technlogy,Mesra -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] GATE C-Question
C ) On Tue, Jul 26, 2011 at 9:02 PM, Vijay Khandar vijaykhand...@gmail.comwrote: Consider the following C-function in which a[n] and b[m] are two sorted integer arrays and c[n+m] be an other integer array. void XYZ(int a[],int b[], int c[]) { int i,j,k; i=j=k=0; while((in)(jm)) { if (a[i]b[j]) c[k++]=a[i++]; else c[k++]=b[j++]; } Which of the following condition(s) hold(s) after the termination of the while loop? i)jm, k=n+j-1, and a[n-1]b[j] if i=n ii)in,k=m+i-1, and b[m-`1]=a[i] if j=m A)only i B)only ii C)either i or ii but not both D)neither i nor ii Can I have to take any example -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] MS c output ques
So if the input is gujarat it scans gujarat to find the first character in gujarat which is also present in india . So the character in gujarat is a so it will stop on encountering a and prints the string scanned till then. If the input is india , it matches at first location so it prints the contents of str which is junk. Now consider rajeev it will print r because of a at second position. and for siva it will print s try it out. Hope you understood the concept. On Tue, Jul 26, 2011 at 10:54 PM, kc Liyan kcli...@gmail.com wrote: if U given input as gujarat the scanf will accept inputs as char's.but there s an ^ which means ex-or operation should be performed regular check of existance of any char of {india}... untill it get's the existance then it will stop the input getting..finally it prints as guj On 7/26/11, siva viknesh sivavikne...@gmail.com wrote: main() { char str[80]; strcpy(str,junk); scanf(%[^india],str); printf(%s,str); } ...input is gujarat.output is guj.plz explain how? -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] Facebook Interview question at NIT Warangal
@Ankur The link does has a very good explanation. Nice solution :) On Tue, Jul 26, 2011 at 10:47 PM, Kunal Patil kp101...@gmail.com wrote: @Ankur Garg: Nice explanation at the link given by u... On Tue, Jul 26, 2011 at 10:35 PM, Ankur Garg ankurga...@gmail.com wrote: Check this http://codesam.blogspot.com/2011/03/find-all-subsets-of-given-set.html On Tue, Jul 26, 2011 at 9:41 PM, Vishal Thanki vishaltha...@gmail.comwrote: Here is the working code.. #include stdio.h #include stdlib.h int a[] = {1,2,3,4,5}; #define ARRLEN(a) (sizeof(a)/sizeof(a[0])) void print_comb(int len) { int tlen = len; int i, j, k; int al = ARRLEN(a); for (i = 0; i al; i++) { for (j=i+len-1; jal;j++) { for (k = i; k i+len-1; k++) { printf(%d , a[k]); } printf(%d\n, a[j]); } } } int main(int argc, char *argv[]) { int len = atoi(argv[1]); print_comb(len); return 0; } On Tue, Jul 26, 2011 at 5:18 PM, praneethn praneeth...@gmail.com wrote: check this link: *http://www.stefan-pochmann.info/spots/tutorials/sets_subsets/* On Tue, Jul 26, 2011 at 11:59 AM, sumit sumitispar...@gmail.com wrote: Given an array of size n, print all the possible subset of array of size k. eg:- input: a[]={1,2,3,4}, k = 2 output: 1,2 1,3 1,4 2,3 2,4 3,4 -- 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. -- 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. -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] Re: write an scanf that reads only a to z charchter.............
@Nithish Yup you are right :) On Wed, Jul 27, 2011 at 12:54 AM, Nitish Garg nitishgarg1...@gmail.comwrote: scanf(%[^a-z],z); will only accept characters other than a-z. The solution must be scanf(%[a-z], z); to read only the characters a-z. -- 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/-/Jr52J0qE63IJ. 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] C OUTPUT
257 is stored as B A 0001 0001 So iptr if int* will be pointing to this above So if we typecast it as char* then it will point to 0001 (A) and *ptr+1 will point to 0001(B) Hope this clear . On Mon, Jul 25, 2011 at 11:41 AM, aditya kumar aditya.kumar130...@gmail.com wrote: main() { int i = 257; int *iPtr = i; printf(%d %d, *((char*)iPtr), *((char*)iPtr+1) ); } can any one explain me the o/p ?? -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] C OUTPUT
@Varun Ofcourse It Will !!! :) On Mon, Jul 25, 2011 at 11:54 AM, varun pahwa varunpahwa2...@gmail.comwrote: @Rajeev : little endian and big endian could create difference in the answers. On Mon, Jul 25, 2011 at 11:50 AM, rajeev bharshetty rajeevr...@gmail.comwrote: 257 is stored as B A 0001 0001 So iptr if int* will be pointing to this above So if we typecast it as char* then it will point to 0001 (A) and *ptr+1 will point to 0001(B) Hope this clear . On Mon, Jul 25, 2011 at 11:41 AM, aditya kumar aditya.kumar130...@gmail.com wrote: main() { int i = 257; int *iPtr = i; printf(%d %d, *((char*)iPtr), *((char*)iPtr+1) ); } can any one explain me the o/p ?? -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] C OUTPUT
I was refering to the answer on my system which Little endian .. On Mon, Jul 25, 2011 at 5:11 PM, rajeev bharshetty rajeevr...@gmail.comwrote: @Varun Ofcourse It Will !!! :) On Mon, Jul 25, 2011 at 11:54 AM, varun pahwa varunpahwa2...@gmail.comwrote: @Rajeev : little endian and big endian could create difference in the answers. On Mon, Jul 25, 2011 at 11:50 AM, rajeev bharshetty rajeevr...@gmail.com wrote: 257 is stored as B A 0001 0001 So iptr if int* will be pointing to this above So if we typecast it as char* then it will point to 0001 (A) and *ptr+1 will point to 0001(B) Hope this clear . On Mon, Jul 25, 2011 at 11:41 AM, aditya kumar aditya.kumar130...@gmail.com wrote: main() { int i = 257; int *iPtr = i; printf(%d %d, *((char*)iPtr), *((char*)iPtr+1) ); } can any one explain me the o/p ?? -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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. -- Varun Pahwa B.Tech (IT) 7th Sem. Indian Institute of Information Technology Allahabad. Ph : 09793899112 Official Email :: rit2008...@iiita.ac.in Another Email :: varunpahwa.ii...@gmail.com People who fail to plan are those who plan to fail. -- 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 Rajeev N B http://www.opensourcemania.co.cc -- Regards Rajeev N B http://www.opensourcemania.co.cc -- 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] Patterns in a String
Yup, Boyer Moore Algorithm will do . In that just keep a count on number of times a particular pattern gets matched in the text. Guys, Which algorithm do you think is better for String matching .Is it KMP or Boyer Moore ?? I think KMP is better ? On Mon, Jul 25, 2011 at 4:59 PM, hary rathor harry.rat...@gmail.com wrote: Boyer–Moore string search algorithmhttp://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithmfor fastest search ever introduced -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] interesting article for becoming a good programmer
@Rajeev Its Awesome dude On Mon, Jul 25, 2011 at 8:01 PM, Rajeev Kumar rajeevprasa...@gmail.comwrote: Hi friends, Go through this link.U may find it helpful... http://blogs.oracle.com/sandip/entry/how_to_be_a_good -- Thank You Rajeev Kumar -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] Question
Insufficient Data ... On Mon, Jul 25, 2011 at 10:29 PM, shady sinv...@gmail.com wrote: easy guys... @sagar nice question, if there had been an option for incomplete info, i would have gone with that... but it made me think thoroughly :) 80 min. is answer @aashish we are forming new group for apti kind of questions... On Mon, Jul 25, 2011 at 10:23 PM, AASHISH SUMAN aashish.barn...@gmail.com wrote: @sagar :: this group is for programming concepts not for apti.. if u wana to post some apti or reasoning question post here.. http://www.facebook.com/groups/150933398312351?ap=1 -- *WITH BEST REGARDS : AASHISH SUMAN MCA FINAL YEAR * *NIT DURGAPUR* *+91-9547969906* -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] OUTPUT
@Deoki Remove the first printf from the program .. You will get 3 3 . The first printf should be removed . And about the output as 3 3 it is beacuse of the right to left eval of printf so i has value 3 after evaluation. On Mon, Jul 25, 2011 at 10:49 PM, Deoki Nandan deok...@gmail.com wrote: run on gcc compiler it would be 0 1 1 On Mon, Jul 25, 2011 at 10:35 PM, geek forgeek geekhori...@gmail.comwrote: 1. #includestdio.h main() { int i=1; printf(\n%d,i^=1%2); printf(\n%d %d,i^=1%2,i=1%2); return 0; } output 3 3 hey shudnt the output be 3 2 -- 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. -- **With Regards Deoki Nandan Vishwakarma * * -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] OUTPUT
@sameer I think that is right On Mon, Jul 25, 2011 at 11:02 PM, sameer.mut...@gmail.com sameer.mut...@gmail.com wrote: its because of side effect where value of i is getting changed twice in a single line. correct me if i am wrong :) *Muthuraj R. 4TH Year BE.** Information Science Dept* *PESIT, Bengaluru . * On Mon, Jul 25, 2011 at 11:01 PM, geek forgeek geekhori...@gmail.comwrote: y not the output is 3 2 coz on right to left evaluation of printf i shud be left shifted by 1 bit wgich shud make it 2 ?? On Mon, Jul 25, 2011 at 10:28 AM, sameer.mut...@gmail.com sameer.mut...@gmail.com wrote: yeah output 0 1 1 *is dis because of side effect? * * * * * *Muthuraj R. 4TH Year BE.** Information Science Dept* *PESIT, Bengaluru . * On Mon, Jul 25, 2011 at 10:49 PM, Deoki Nandan deok...@gmail.comwrote: run on gcc compiler it would be 0 1 1 On Mon, Jul 25, 2011 at 10:35 PM, geek forgeek geekhori...@gmail.comwrote: 1. #includestdio.h main() { int i=1; printf(\n%d,i^=1%2); printf(\n%d %d,i^=1%2,i=1%2); return 0; } output 3 3 hey shudnt the output be 3 2 -- 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. -- **With Regards Deoki Nandan Vishwakarma * * -- 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. -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] OUTPUT
#includestdio.h main() { int i=1; printf(\n%d ,i=1%2); return 0; } Try only this It provides o/p as 2 so it must be side effect. On Mon, Jul 25, 2011 at 11:04 PM, rajeev bharshetty rajeevr...@gmail.comwrote: @sameer I think that is right On Mon, Jul 25, 2011 at 11:02 PM, sameer.mut...@gmail.com sameer.mut...@gmail.com wrote: its because of side effect where value of i is getting changed twice in a single line. correct me if i am wrong :) *Muthuraj R. 4TH Year BE.** Information Science Dept* *PESIT, Bengaluru . * On Mon, Jul 25, 2011 at 11:01 PM, geek forgeek geekhori...@gmail.comwrote: y not the output is 3 2 coz on right to left evaluation of printf i shud be left shifted by 1 bit wgich shud make it 2 ?? On Mon, Jul 25, 2011 at 10:28 AM, sameer.mut...@gmail.com sameer.mut...@gmail.com wrote: yeah output 0 1 1 *is dis because of side effect? * * * * * *Muthuraj R. 4TH Year BE.** Information Science Dept* *PESIT, Bengaluru . * On Mon, Jul 25, 2011 at 10:49 PM, Deoki Nandan deok...@gmail.comwrote: run on gcc compiler it would be 0 1 1 On Mon, Jul 25, 2011 at 10:35 PM, geek forgeek geekhori...@gmail.comwrote: 1. #includestdio.h main() { int i=1; printf(\n%d,i^=1%2); printf(\n%d %d,i^=1%2,i=1%2); return 0; } output 3 3 hey shudnt the output be 3 2 -- 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. -- **With Regards Deoki Nandan Vishwakarma * * -- 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. -- 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 Rajeev N B http://www.opensourcemania.co.cc -- Regards Rajeev N B http://www.opensourcemania.co.cc -- 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] OUTPUT
#includestdio.h main() { int i=1; printf(\n%d%d, i=1%2); return 0; } In the above program the output is 2 as expected . now since #includestdio.h main() { int i=1; printf(\n%d%d ,i=2,i=1%2); return 0; } Now since we are introducing an another statement which modifies i in the same line , the previous value of i gets affected and changes to the new value provided by the first i=2 So above o/p will be 8 8 though i=1%2 is 2 initially it gets affected by i=2 and so value changes to 8 of both i's Hope this is clear ... On Mon, Jul 25, 2011 at 11:06 PM, aditi garg aditi.garg.6...@gmail.comwrote: Can u plz elaborate...im not able to understand... On Mon, Jul 25, 2011 at 11:04 PM, rajeev bharshetty rajeevr...@gmail.comwrote: @sameer I think that is right On Mon, Jul 25, 2011 at 11:02 PM, sameer.mut...@gmail.com sameer.mut...@gmail.com wrote: its because of side effect where value of i is getting changed twice in a single line. correct me if i am wrong :) *Muthuraj R. 4TH Year BE.** Information Science Dept* *PESIT, Bengaluru . * On Mon, Jul 25, 2011 at 11:01 PM, geek forgeek geekhori...@gmail.comwrote: y not the output is 3 2 coz on right to left evaluation of printf i shud be left shifted by 1 bit wgich shud make it 2 ?? On Mon, Jul 25, 2011 at 10:28 AM, sameer.mut...@gmail.com sameer.mut...@gmail.com wrote: yeah output 0 1 1 *is dis because of side effect? * * * * * *Muthuraj R. 4TH Year BE.** Information Science Dept* *PESIT, Bengaluru . * On Mon, Jul 25, 2011 at 10:49 PM, Deoki Nandan deok...@gmail.comwrote: run on gcc compiler it would be 0 1 1 On Mon, Jul 25, 2011 at 10:35 PM, geek forgeek geekhori...@gmail.com wrote: 1. #includestdio.h main() { int i=1; printf(\n%d,i^=1%2); printf(\n%d %d,i^=1%2,i=1%2); return 0; } output 3 3 hey shudnt the output be 3 2 -- 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. -- **With Regards Deoki Nandan Vishwakarma * * -- 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. -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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. -- Aditi Garg Undergraduate Student Electronics Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi 9718388816 -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] OUTPUT
@Ambika Clearly its compiler dependent , My explanation was for gcc 4.3.2 , So it Depends!!1 On Tue, Jul 26, 2011 at 7:03 AM, ambika iyer balu200...@gmail.com wrote: @rajeev : in dev cpp the output is coming as 8 2 for the 2nd code :( y is tat so??? On Mon, Jul 25, 2011 at 11:30 PM, aditi garg aditi.garg.6...@gmail.comwrote: @Rajeev yes its clear now...thanx a lot:) On Mon, Jul 25, 2011 at 11:27 PM, nitesh abhishek.khattr...@gmail.comwrote: Well the output will be compiler dependent. I am using Dev C++ which supports gcc based compilers and am getting deifferent answer #includestdio.h main() { int i=1; printf(\n%d,i^=1%2); printf(\n%d %d,i^=1%2,i=1%2); return 0; } Output: 0 1 0 -- 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/-/0Nl5SIjPGekJ. 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. -- Aditi Garg Undergraduate Student Electronics Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi 9718388816 -- 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. -- Ambi :) -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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] main function
Yes, Main() function can call itself, but if called it will recurs e till stack overflows or break or ext() statement occurs . On Sun, Jul 24, 2011 at 11:52 AM, Arshad Alam alam3...@gmail.com wrote: can main function call itself? -- 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 Rajeev N B http://www.opensourcemania.co.cc -- 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.