[algogeeks] [brain teaser ] RIDDLE OF THE DAY 29 april
* RIDDLE OF THE DAY A man was killed on Sunday morning. His wife found the body and called the police. The police arrived and questioned the chef, maid, butler, and gardener. Their alibis were: Chef - making breakfast Maid - getting mail Butler - setting table Gardener - watering plants The police immediately arrested the criminal. Who was it and how did they know? * *Update Your Answers at* : Click Herehttp://dailybrainteaser.blogspot.com/2011/04/riddle-of-day-29-april.html?lavesh=lavesh Solution: Will be updated after 1 day -- Never explain yourself. Your friends don’t need it and your enemies won’t believe it . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Re: RIDDLE OF THE DAY 29 april
Maid was the criminal because she lied. The day was sunday and you don't get mails on sunday On Apr 29, 12:57 pm, Lavesh Rawat lavesh.ra...@gmail.com wrote: * RIDDLE OF THE DAY A man was killed on Sunday morning. His wife found the body and called the police. The police arrived and questioned the chef, maid, butler, and gardener. Their alibis were: Chef - making breakfast Maid - getting mail Butler - setting table Gardener - watering plants The police immediately arrested the criminal. Who was it and how did they know? * *Update Your Answers at* : Click Herehttp://dailybrainteaser.blogspot.com/2011/04/riddle-of-day-29-april.h... Solution: Will be updated after 1 day -- Never explain yourself. Your friends don’t need it and your enemies won’t believe it . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] A SIMPLE C++ PROGRAM.
*Can anyone please explain me the output of this program:* int x=1; int y=x++ + ++x + ++x + x++; couty; coutx; -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Re: Problem regarding MySql server Installation
i forget to say that every tool has its own site for documentation help check it it out http://dev.mysql.com/doc/refman/5.5/en/default-privileges.html Thanks Shashank -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Re: Problem regarding MySql server Installation
As i remeber you can do this on command prompt type i am assuming u have installed configured mysql mysql -u username -p password i think u shoud have google it Thanks Regards Shashank Mani The Best Way to escape Fromm problem is Solve It CSE,BIT 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.
[algogeeks] Do you Think Allocating memory to 2D Array is easy ???
Basically we have to implement function which allocates memory to a two dimensional array. we have to Minimize the number of calls to malloc and make sure that the memory is accessible by the notation arr[i][j]. .important part of the question is we have to implement the it using single call to MALLOC..its strictly means only 1 time ?? so make sure your not calling malloc more then 1 so lets make our hand dirty..?? Please Read Question Carefully... Thanks Regrads Shashank -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Re: RIDDLE OF THE DAY 29 april
its the maid, the mail office would be off on sunday On Apr 29, 1:27 pm, Anurag Gupta anurag.gupta...@gmail.com wrote: Maid was the criminal because she lied. The day was sunday and you don't get mails on sunday On Apr 29, 12:57 pm, Lavesh Rawat lavesh.ra...@gmail.com wrote: * RIDDLE OF THE DAY A man was killed on Sunday morning. His wife found the body and called the police. The police arrived and questioned the chef, maid, butler, and gardener. Their alibis were: Chef - making breakfast Maid - getting mail Butler - setting table Gardener - watering plants The police immediately arrested the criminal. Who was it and how did they know? * *Update Your Answers at* : Click Herehttp://dailybrainteaser.blogspot.com/2011/04/riddle-of-day-29-april.h... Solution: Will be updated after 1 day -- Never explain yourself. Your friends don’t need it and your enemies won’t believe it . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Re: RIDDLE OF THE DAY 29 april
its the maid, the mail office would be off on sunday On Apr 29, 12:57 pm, Lavesh Rawat lavesh.ra...@gmail.com wrote: * RIDDLE OF THE DAY A man was killed on Sunday morning. His wife found the body and called the police. The police arrived and questioned the chef, maid, butler, and gardener. Their alibis were: Chef - making breakfast Maid - getting mail Butler - setting table Gardener - watering plants The police immediately arrested the criminal. Who was it and how did they know? * *Update Your Answers at* : Click Herehttp://dailybrainteaser.blogspot.com/2011/04/riddle-of-day-29-april.h... Solution: Will be updated after 1 day -- Never explain yourself. Your friends don’t need it and your enemies won’t believe it . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Re: Problem regarding MySql server Installation
Sorry, but this isn't a mysql group. all discussions need to be algorithm related. On Apr 28, 3:04 pm, Aniket aniket...@gmail.com wrote: I was trying to install mysql 5.5. in Windows XP.After installation during configuration phase when there was to apply security settings I m always getting an error Error No 1045 Access Denied for user 'root'@localhost(using password: NO). I have tried all possibilities in Firewall but it dint work.Hope anybody here will help me out of this problem.I am totally screwed up!!! -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Do you Think Allocating memory to 2D Array is easy ???
Suppose array is of A[N][M] then int **A = (int **) malloc(N*M * sizeof(int *) ); On Fri, Apr 29, 2011 at 6:00 PM, bittu shashank7andr...@gmail.com wrote: Basically we have to implement function which allocates memory to a two dimensional array. we have to Minimize the number of calls to malloc and make sure that the memory is accessible by the notation arr[i][j]. .important part of the question is we have to implement the it using single call to MALLOC..its strictly means only 1 time ?? so make sure your not calling malloc more then 1 so lets make our hand dirty..?? Please Read Question Carefully... Thanks Regrads Shashank -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Harshit Gangal Fourth Year Undergraduate Student Dept. of Computer Science JIIT, Noida , 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.
Re: [algogeeks] A SIMPLE C++ PROGRAM.
*I can't explain it.* * * This code is evil, never coding like this. It's relate to specific C++ compiler implement. That's all my know about it. This my first post at googlegroups. Hello everyone. :) On Fri, Apr 29, 2011 at 4:31 PM, MANNU manishkr2...@gmail.com wrote: *Can anyone please explain me the output of this program:* int x=1; int y=x++ + ++x + ++x + x++; couty; coutx; -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] A SIMPLE C++ PROGRAM.
here y= 1+ 3+4+4= 12 and x=5 here just follow rules of postfix and prefix operator thanks manish -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 SIMPLE C++ PROGRAM.
Manish is right. This would start from the left. In cout also processing starts from left. The processing is from right in the printf statement. -- Tushar Bindal Computer Engineering Delhi College of Engineering Mob: +919818442705 E-Mail : tusharbin...@jugadengg.com Website: www.jugadengg.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.
Re: [algogeeks] A SIMPLE C++ PROGRAM.
Manish is right. I'm so sorry, the evil code what I said before is uglier as follows int x=1; int y=x++ + ++x + ++x - x++; couty; Forgive my careless please...:( On Fri, Apr 29, 2011 at 4:31 PM, MANNU manishkr2...@gmail.com wrote: *Can anyone please explain me the output of this program:* int x=1; int y=x++ + ++x + ++x + x++; couty; coutx; -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] A SIMPLE C++ PROGRAM.
Yes it is correct that if we apply rules for postfix and prefix operators, the answer should be 12,5 but it is showing 10,5. So please explain this. Thanks and Regards DEVANSH GUPTA B.TECH SECOND YEAR COMPUTER SCIENCE AND ENGINEERING 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.
[algogeeks] problem regarding gcc installation
i am using ubuntu 8.04 nd currently installed gcc 4.2 do anyone knws the steps of installing gcc of version greater thn 4.4 on ubuntu 8.04. i hv searched a lot on net bt couldnt find 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.
Re: [algogeeks] problem regarding gcc installation
On 29/04/2011 19:31, himanshu kansal wrote: i am using ubuntu 8.04 nd currently installed gcc 4.2 do anyone knws the steps of installing gcc of version greater thn 4.4 on ubuntu 8.04. i hv searched a lot on net bt couldnt find 1... This is *not* the correct mailing list to ask such questions. I'd suggest you ask either a Ubuntu or GCC oriented list. Thank you for your cooperation. Charles. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 regarding gcc installation
yeah i knw dt well...bt i jus asked if sum1 cd help me On Sat, Apr 30, 2011 at 12:20 AM, Charles Turner chtu...@gmail.com wrote: On 29/04/2011 19:31, himanshu kansal wrote: i am using ubuntu 8.04 nd currently installed gcc 4.2 do anyone knws the steps of installing gcc of version greater thn 4.4 on ubuntu 8.04. i hv searched a lot on net bt couldnt find 1... This is *not* the correct mailing list to ask such questions. I'd suggest you ask either a Ubuntu or GCC oriented list. Thank you for your cooperation. Charles. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] problem regarding gcc installation
On 29/04/2011 19:52, himanshu kansal wrote: yeah i knw dt well...bt i jus asked if sum1 cd help me I really don't think people who have subscribed to read algorithm related discussions want to read about your problems installing a compiler. When you find the appropriate list (see hints in my previous mail) another tip I can give you is to actually explain the problem, such as what errors you see. Please, refrain from polluting this list with off-topic help requests. Charles. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Re: sequence number puzzle 18april
Sort by English: Eight Five Four Nine One Seven Six Ten Three Two Zero On Apr 18, 4:28 pm, Lavesh Rawat lavesh.ra...@gmail.com wrote: * sequence number puzzle What is special about the following sequence of numbers? 8 5 4 9 1 7 6 10 3 2 0 * *Update Your Answers at* : Click Herehttp://dailybrainteaser.blogspot.com/2011/04/sequence-number-puzzle-1... Solution: Will be updated after 1 day -- Never explain yourself. Your friends don’t need it and your enemies won’t believe it . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Text book doubt
http://www.ocf.berkeley.edu/~wwu/riddles/cs.shtml#singleInstrComp -- Rahul -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Need help on fenwick trees
Hi Guys , Can any one give link for tutorial or videos about segment trees. I am unable to understand the basic idea behind it . Regards, vinod -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] If anyone have this book please mail me Thanks in advance
http://megaupload.com/?d=NB80UORF password:ebooksclub.org Its a 7 zip file. On Tue, Apr 19, 2011 at 11:05 PM, D.N.Vishwakarma@IITR deok...@gmail.comwrote: Cracking the Coding Interview by *Gayle Laakmannhttp://pothi.com/pothi/search/google?cx=014194668748364006794:ovhp_xhwczgcof=FORID:11query=Gayle%20Laakmannop=Searchform_id=google_cse_searchbox_form * -- **With Regards Deoki Nandan Vishwakarma IITR MCA Mathematics Department* * -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Topo. There are days when solitude is a heady wine that intoxicates you with freedom, others when it is a bitter tonic, and still others when it is a poison that makes you beat your head against the wall. ~Colette -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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: If any one have algorithms for interviews by adnan aziz ebook... Please mail ...
mail to me too:) Thanks in Advance On 24 April 2011 11:37, karansac...@gmail.com karansac...@gmail.com wrote: Hi Folks, I have been looking for this book for the past few months, This group is the last hope left. Please mail it to :- karansac...@gmail.com , karan.sac...@yahoo.com Thanks!! Karan Sachan #-+91-9663373478 On Mar 22, 10:11 pm, Himanshu Neema potential.himansh...@gmail.com wrote: Turns out that I cant send file larger than 4 MB , please download it from here , let me know if you're still unable to download: http://dl.dropbox.com/u/2681370/Algorithms%2Bfor%2BInterviews%2B%28sc... have fun ! On Tue, Mar 22, 2011 at 10:21 PM, Himanshu Neema potential.himansh...@gmail.com wrote: Enjoy :) On Tue, Mar 22, 2011 at 10:09 PM, Saravanan T mail2sarava...@gmail.comwrote: ++ On Tue, Mar 22, 2011 at 9:51 PM, Anurag atri anu.anurag@gmail.comwrote: and me too :) On Tue, Mar 22, 2011 at 9:28 PM, Nikhil Mishra mishra00...@gmail.comwrote: count me too On Tue, Mar 22, 2011 at 11:16 AM, kunal srivastav kunal.shrivas...@gmail.com wrote: plz send it to me too On Tue, Mar 22, 2011 at 11:14 AM, D.N.Vishwakarma@IITR deok...@gmail.com wrote: -- *With Regards Deoki Nandan Vishwakarma IITR MCA Mathematics Department * -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- thezeitgeistmovement.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. -- Regards Anurag Atri -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Do you Think Allocating memory to 2D Array is easy ???
I have not written code in C for a while, so pardon any gaffes. Let us say the dimensions of the array to be created are m and n. To create the array - (int *)malloc(sizeof(int)*m*n); To access - arr[i][j] = get the memory location by n*i+j. --Anurag On Fri, Apr 29, 2011 at 6:00 PM, bittu shashank7andr...@gmail.com wrote: Basically we have to implement function which allocates memory to a two dimensional array. we have to Minimize the number of calls to malloc and make sure that the memory is accessible by the notation arr[i][j]. .important part of the question is we have to implement the it using single call to MALLOC..its strictly means only 1 time ?? so make sure your not calling malloc more then 1 so lets make our hand dirty..?? Please Read Question Carefully... Thanks Regrads Shashank -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Re: sort in minimum cost
Given the list, you would never want to decrement the last element as you want it to be the maximum. so either retain or remove the last element Lets consider the Minimum cost among the sequence i to j as Cost[i..j] So if you remove the element j, you add j to the cost Cost[i..j] = Min{ Min(cost[i..j-1])+j, SortByDecremet(Cost(i..j))} in SortByDecrement returns the total cost of decrementing the elements i to j-1 so that they are not greater than element j(such that the list is non-decreasing). If we solve this equation recursively then I think we will get the minmum cost. I hope this can be represented in a better way/better equation. Correct me if anything is not taken care of . On Tue, Apr 26, 2011 at 3:58 PM, snehal jain learner@gmail.com wrote: @above you cant increment On Tue, Apr 26, 2011 at 3:48 PM, Naveen Agrawal nav.coo...@gmail.comwrote: @snehal jain 4 9 8 7 8 o/p 4 7 7 7 8 cost 3 by decrementing 9 n 8 Yes, now question is clear but your last example is incorrect. 4 9 8 7 8 o/p 4 8 8 8 8 cost 2 = decrementing (9 to 8) + incrementing (7 to 8) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Fwd: Problems
This is an assignment. Ryt? :P On Thu, Apr 28, 2011 at 1:31 PM, D.N.Vishwakarma@IITR deok...@gmail.comwrote: * * *Just give some time to these problems and solve it. Its sort of Urgent.And Let me know the Solution. * 1. Write an algorithm to implement a stack using a two dimensional array. 2. Write an algorithm to store elements of a two-dimensional array in a simple stack. 3. You are in a rectangular area having one entry and one exit. The Entrance is at the upper-left corner and the exit is at the lower-right corner. The interior of the maze contains walls or obstacles that you can not walk through. These obstacles are placed along rows and columns that are parallel to the rectangular boundary of the maze. You can move north, south, east or west neighboring positions. Write an algorithm to find a path from entrance to exit using Stack data structure. 4.Bob has a set A of n nuts and a set B of n bolts such that each nut in A has a unique matching bolt in B. Unfortunately, the nuts in A all look the same, and the bolts in B all look the same as well. The only kind of a comparison that Bob can make is to take a nut-bolt pair (a,b), such that a belongs to A and B belongs to B, and test it to see if the threads of a are larger, smaller or a perfect match with the threads of B. Describe an efficient algorithm for Bob to match up all his nuts and bolts. 5. A 3 –ary tree consists of two data fields: name and Age. Design an algorithm for viewing the contents of all even numbered levels starting from last-level. In a level display all nodes from right to left. Root is at level 0. Thank You... -- **With Regards Deoki Nandan Vishwakarma IITR MCA Mathematics Department* * -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Umer -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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
But does there exist a general method to do this for all binary trees . . I mean if this answer were true then all binary trees would be complete :) On 4/17/11, Sreeprasad Govindankutty sreeprasad...@gmail.com wrote: Yes this is the solution when the binary tree is complete binary tree Thanks and many regards, Sreeprasad Govindankutty On Sat, Apr 16, 2011 at 3:57 PM, Pratik Kathalkar dancewithpra...@gmail.com wrote: I think this solution is applicable if the binary tree is complete binary tree, isn't it? On Thu, Apr 14, 2011 at 12:52 AM, Harshit Gangal harshit.gan...@gmail.com wrote: it 2*node and 2*node+1, if binary tree is stored in an array On Thu, Apr 14, 2011 at 12:36 AM, Vishakha Parvatikar vishakha.parvati...@gmail.com wrote: Given a binary tree, write a program to find the cousin nodes of the given node. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Harshit Gangal Fourth Year Undergraduate Student Dept. of Computer Science JIIT, Noida , 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. -- Pratik Kathalkar CoEP BTech IT 8149198343 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- Rahul -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Cracking the IT interview: jump start your career with confidence
mee++; :) On 25 April 2011 16:12, raj singh ankurkaku...@gmail.com wrote: mujhe bhi -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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.
[algogeeks] Re: sequence number puzzle 18april
Sort by English: Eight Five Four Nine One Seven Six Ten Three Two Zero On Apr 18, 4:28 pm, Lavesh Rawat lavesh.ra...@gmail.com wrote: * sequence number puzzle What is special about the following sequence of numbers? 8 5 4 9 1 7 6 10 3 2 0 * *Update Your Answers at* : Click Herehttp://dailybrainteaser.blogspot.com/2011/04/sequence-number-puzzle-1... Solution: Will be updated after 1 day -- Never explain yourself. Your friends don’t need it and your enemies won’t believe it . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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
But does there exist a general method to do this for all binary trees . . I mean if this answer were true then all binary trees would be complete :) correct me if i think wrong On 4/17/11, rahul rai raikra...@gmail.com wrote: But does there exist a general method to do this for all binary trees . . I mean if this answer were true then all binary trees would be complete :) On 4/17/11, Sreeprasad Govindankutty sreeprasad...@gmail.com wrote: Yes this is the solution when the binary tree is complete binary tree Thanks and many regards, Sreeprasad Govindankutty On Sat, Apr 16, 2011 at 3:57 PM, Pratik Kathalkar dancewithpra...@gmail.com wrote: I think this solution is applicable if the binary tree is complete binary tree, isn't it? On Thu, Apr 14, 2011 at 12:52 AM, Harshit Gangal harshit.gan...@gmail.com wrote: it 2*node and 2*node+1, if binary tree is stored in an array On Thu, Apr 14, 2011 at 12:36 AM, Vishakha Parvatikar vishakha.parvati...@gmail.com wrote: Given a binary tree, write a program to find the cousin nodes of the given node. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Harshit Gangal Fourth Year Undergraduate Student Dept. of Computer Science JIIT, Noida , 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. -- Pratik Kathalkar CoEP BTech IT 8149198343 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- Rahul -- Rahul -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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: sort in minimum cost
This seems longest increasing subsequence problem to me.. Thanks, Anurag On Mon, Apr 25, 2011 at 9:31 PM, snehal jain learner@gmail.com wrote: few eg input 4 7 12 3 1 output 4 7 12 cost: 4 by removing 3 n 1 eg 2 6 3 5 7 12 4 o/p 3 3 5 7 12 cost 7 by decrementing 6 by 3 and removing 4 eg 3 4 9 8 7 8 o/p 4 7 7 7 8 cost 3 by decrementing 9 n 8 i hope its clear now.. On Mon, Apr 25, 2011 at 9:16 PM, hary rathor harry.rat...@gmail.comwrote: just tell me what is input and what will the output. atleast 3 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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] If any one have algorithms for interviews by adnan aziz ebook... Please mail ...
please send it to me also... don.sat...@gmail.com Thanks, Sathaiah On Tue, Apr 19, 2011 at 6:49 AM, nagajyothi gunti nagajyothi.gu...@gmail.com wrote: Please send me too at nagajyothi.gu...@gmail.com Also, please let me know what all to prepare...I have an phone interview from amazon this wednesday. On Mon, Apr 18, 2011 at 2:40 PM, vaibhav agrawal agrvaib...@gmail.comwrote: Please send it to me tooo agrvaib...@gmail.com On Mon, Apr 18, 2011 at 10:30 PM, Rel Guzman Apaza rgap...@gmail.comwrote: Send to me too. Please. rgap...@gmail.com 2011/4/18 Abhishek Goswami zeal.gosw...@gmail.com I think we can share into email...that will not be any issue. :) On Mon, Apr 18, 2011 at 10:07 PM, Abhishek Goswami zeal.gosw...@gmail.com wrote: can u please me also .. zeal_gosw...@yahoo.com On Thu, Apr 14, 2011 at 11:50 AM, Himanshu Neema potential.himansh...@gmail.com wrote: Hi All , Yesterday I received an email from Author that this is *violation of Intellectual Property Ownership* ,So kindly please delete pdfs please remove all the sharing. Thanks Guys. Himanshu On Thu, Apr 14, 2011 at 10:52 AM, Harshal hc4...@gmail.com wrote: Thanks :) On Thu, Apr 14, 2011 at 9:59 AM, Rajeev Kumar rajeevprasa...@gmail.com wrote: check this link: https://docs.google.com/viewer?a=vpid=explorerchrome=truesrcid=1B5ady61W_93zq0st5FQpvzj4d6wFCdM3Vl8YGSqRt0_NVFWh3SGkNU24hIb3hl=en If you have any problem in access,please inform me On Thu, Apr 14, 2011 at 1:04 AM, Abhishek Goswami zeal.gosw...@gmail.com wrote: Hi, I tried to open this book in google docs and got message that file is not avaliable. does this file not available in google docs if yes , can anybody share this book again On Tue, Mar 22, 2011 at 10:41 PM, Himanshu Neema potential.himansh...@gmail.com wrote: Turns out that I cant send file larger than 4 MB , please download it from here , let me know if you're still unable to download: http://dl.dropbox.com/u/2681370/Algorithms%2Bfor%2BInterviews%2B%28scan%2Bocr%29%20%281%29.pdf have fun ! On Tue, Mar 22, 2011 at 10:21 PM, Himanshu Neema potential.himansh...@gmail.com wrote: Enjoy :) On Tue, Mar 22, 2011 at 10:09 PM, Saravanan T mail2sarava...@gmail.com wrote: ++ On Tue, Mar 22, 2011 at 9:51 PM, Anurag atri anu.anurag@gmail.com wrote: and me too :) On Tue, Mar 22, 2011 at 9:28 PM, Nikhil Mishra mishra00...@gmail.com wrote: count me too On Tue, Mar 22, 2011 at 11:16 AM, kunal srivastav kunal.shrivas...@gmail.com wrote: plz send it to me too On Tue, Mar 22, 2011 at 11:14 AM, D.N.Vishwakarma@IITR deok...@gmail.com wrote: -- *With Regards Deoki Nandan Vishwakarma IITR MCA Mathematics Department * -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- thezeitgeistmovement.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. -- Regards Anurag Atri -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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
[algogeeks] Re: Building a Binary tree with XOR
you might want to explain what you want to do with an example ! On Apr 20, 11:09 am, sunil sunil@gmail.com wrote: Hi All, Before starting any binary tree problem I will be creating such kind of binary tree and will be solving that problem accordingly. From the last few days I am trying to code to build a binary tree with Exclusive Operators. Here I am trying to build the tree in the level order way like all the elements will be placed in the queue in the order of levels so that the final binary tree will be almost complete binary tree. In general the left node will contain the left side tree adress details and right node will contain the right tree details. But the XOR Binary trees will be holding the XOR values of parent and left child in the left node and in the same way the parent and right child will be in the right part. Here I am unable to track the parent of a particular node after the level 3. Does it possible to create a XOR binary tree with the level order mechanism. If possible, could you provide me clues in resolving this problem. My files looks like as below Header file: #includeiostream #includequeue using namespace std; typedef unsigned long pointer; struct BTXNode { int data; struct BTXNode* fleft; struct BTXNode* fright; }; class BTX { struct BTXNode *root; public: BTX() { root=NULL; } struct BTXNode* getNode(int data); int insertAtLeaf(struct BTXNode* node); }; -- CPP file --- #include btf_xor.h struct BTXNode* BTX::getNode(int data) { struct BTXNode* node=new BTXNode(); node-data=data; node-fleft=NULL; node-fright=NULL; return node; } int BTX::insertAtLeaf(struct BTXNode* nd) { coutinsertAtLeaf Data is nd-dataendl; bool set_ind=true; bool right_ind=false; struct BTXNode *parent=NULL; if(!root) { root=nd; return 1; } queueBTXNode* q; q.push(root); q.push(NULL); while(!q.empty() set_ind) { struct BTXNode *temp=q.front(); q.pop(); if(temp) { couttemp-data istemp-dataendl; if(temp-fleft != parent) { struct BTXNode* left=(struct BTXNode*) ((pointer)temp-fleft^(pointer)parent); q.push(left); right_ind=true; } else { nd-fleft=(struct BTXNode*) ((pointer)temp ^ (pointer)nd-fleft); nd-fright=(struct BTXNode*) ((pointer)temp ^ (pointer)nd-fright); //temp-fleft=(struct BTXNode*) ((pointer)nd ^ (pointer)parent); temp-fleft=(struct BTXNode*) ((pointer)nd ^ (pointer)temp-fleft); right_ind=false; set_ind=false; } if(right_ind) { if(temp-fright != parent) { struct BTXNode* right=(struct BTXNode*)((pointer)temp-fright^(pointer)parent); q.push(right); right_ind=true; } else { nd-fright=(struct BTXNode*) ((pointer)temp ^ (pointer)nd-fright); nd-fleft=(struct BTXNode*) ((pointer)temp ^ (pointer)nd-fleft); //temp-fright=(struct BTXNode*) ((pointer)nd ^ (pointer)parent); temp-fright=(struct BTXNode*) ((pointer)nd ^ (pointer)temp-fright); set_ind=false; } } parent=temp; } else { if(!q.empty()) { q.push(NULL); } } } } int main() { BTX btx; btx.insertAtLeaf(btx.getNode(10) ); btx.insertAtLeaf(btx.getNode(8)); btx.insertAtLeaf(btx.getNode(12)); btx.insertAtLeaf(btx.getNode(7)); btx.insertAtLeaf(btx.getNode(9)); btx.insertAtLeaf(btx.getNode(11)); btx.insertAtLeaf(btx.getNode(13)); return 0; }
[algogeeks] Re: Reading Huge input from the terminal in least time.
use this #includecstdio #includeiostream char ipos, opos, InpFile[2000], OutFile[2000], DIP[20]; inline int input(int flag=0) { while(*ipos = 32) ++ipos;//skips white spaces if ( flag ) return (*ipos++ - '0'); / For getting Boolean Characters */ int x=0, neg = 0;char c; while( true ) { c=*ipos++; if(c == '-') neg = 1; else { if (c=32) return neg?-x:x; x=(x1)+(x3)+c-'0'; } } } inline void output(int x,int flag) { int y,dig=0; if(x0){ *opos++='-'; x=-x;} while (x||!dig) { y=x/10;DIP[dig++]=x-((y 3) + (y 1))+'0';x=y;} while (dig--) *opos++=DIP[dig]; *opos++= flag ? '\n' : ' '; } inline void InitFASTIO() { ipos = InpFile; opos = OutFile; fread_unlocked(InpFile,2000,1,stdin); } inline void FlushFASTIO() { fwrite_unlocked(OutFile,opos-OutFile,1,stdout); } On Apr 20, 8:06 am, abhijith reddy abhijith200...@gmail.com wrote: You could read input character by character using getchar_unlocked() untill you hit a space or new line or EOF. Alternatively you read the whole input at once using fread_unlocked() and then process it as per your need. On Wed, Apr 20, 2011 at 7:41 AM, shubham shubh2...@gmail.com wrote: Hello Geeks, Suppose we have a 2-d array arr[1000][1000] capable of storing 10^6 elements in it. Input is supplied one row at a time. Then what is the best possible way to read this much data in the least amount of time as scanf() or cin takes a lot of time? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] problem regarding gcc installation
I second Charles thought . The quality of the list is detoriating day by day, due to such off topic questions. On 30-Apr-2011 12:27 AM, Charles Turner chtu...@gmail.com wrote: On 29/04/2011 19:52, himanshu kansal wrote: yeah i knw dt well...bt i jus asked if sum1 cd help me I really don't think people who have subscribed to read algorithm related discussions want to read about your problems installing a compiler. When you find the appropriate list (see hints in my previous mail) another tip I can give you is to actually explain the problem, such as what errors you see. Please, refrain from polluting this list with off-topic help requests. Charles. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] A SIMPLE C++ PROGRAM.
I think these questions are stupid in the sense that no one would ever use these constructs in their production code unless someone wants to write an obscure obfuscated code in some competition. Many times similar expressions are non-portable. Anyways, to understand this and related concepts, please see iso c or c++ standard and try to understand operator precedence, operator associativity and sequence points. On Fri, Apr 29, 2011 at 3:06 PM, Nikhil Gupta nikhilgupta2...@gmail.comwrote: 12 5 because y=4+4+3+1 and x is incremented to 5 On Fri, Apr 29, 2011 at 2:01 PM, MANNU manishkr2...@gmail.com wrote: *Can anyone please explain me the output of this program:* int x=1; int y=x++ + ++x + ++x + x++; couty; coutx; -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Re: If any one have algorithms for interviews by adnan aziz ebook... Please mail ...
Hey how's ur interview? if u have the book pls mail me to gvr.su...@gmail.com On Apr 19, 6:19 am, nagajyothi gunti nagajyothi.gu...@gmail.com wrote: Please send me too at nagajyothi.gu...@gmail.com Also, please let me know what all to prepare...I have an phone interview from amazon this wednesday. On Mon, Apr 18, 2011 at 2:40 PM, vaibhav agrawal agrvaib...@gmail.comwrote: Please send it to me tooo agrvaib...@gmail.com On Mon, Apr 18, 2011 at 10:30 PM, Rel Guzman Apaza rgap...@gmail.comwrote: Send to me too. Please. rgap...@gmail.com 2011/4/18 Abhishek Goswami zeal.gosw...@gmail.com I think we can share into email...that will not be any issue. :) On Mon, Apr 18, 2011 at 10:07 PM, Abhishek Goswami zeal.gosw...@gmail.com wrote: can u please me also .. zeal_gosw...@yahoo.com On Thu, Apr 14, 2011 at 11:50 AM, Himanshu Neema potential.himansh...@gmail.com wrote: Hi All , Yesterday I received an email from Author that this is *violation of Intellectual Property Ownership* ,So kindly please delete pdfs please remove all the sharing. Thanks Guys. Himanshu On Thu, Apr 14, 2011 at 10:52 AM, Harshal hc4...@gmail.com wrote: Thanks :) On Thu, Apr 14, 2011 at 9:59 AM, Rajeev Kumar rajeevprasa...@gmail.com wrote: check this link: https://docs.google.com/viewer?a=vpid=explorerchrome=truesrcid=1B5... If you have any problem in access,please inform me On Thu, Apr 14, 2011 at 1:04 AM, Abhishek Goswami zeal.gosw...@gmail.com wrote: Hi, I tried to open this book in google docs and got message that file is not avaliable. does this file not available in google docs if yes , can anybody share this book again On Tue, Mar 22, 2011 at 10:41 PM, Himanshu Neema potential.himansh...@gmail.com wrote: Turns out that I cant send file larger than 4 MB , please download it from here , let me know if you're still unable to download: http://dl.dropbox.com/u/2681370/Algorithms%2Bfor%2BInterviews%2B%28sc... have fun ! On Tue, Mar 22, 2011 at 10:21 PM, Himanshu Neema potential.himansh...@gmail.com wrote: Enjoy :) On Tue, Mar 22, 2011 at 10:09 PM, Saravanan T mail2sarava...@gmail.com wrote: ++ On Tue, Mar 22, 2011 at 9:51 PM, Anurag atri anu.anurag@gmail.com wrote: and me too :) On Tue, Mar 22, 2011 at 9:28 PM, Nikhil Mishra mishra00...@gmail.com wrote: count me too On Tue, Mar 22, 2011 at 11:16 AM, kunal srivastav kunal.shrivas...@gmail.com wrote: plz send it to me too On Tue, Mar 22, 2011 at 11:14 AM, D.N.Vishwakarma@IITR deok...@gmail.com wrote: -- *With Regards Deoki Nandan Vishwakarma IITR MCA Mathematics Department * -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- thezeitgeistmovement.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. -- Regards Anurag Atri -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com . To unsubscribe from 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
Re: [algogeeks] Re: If any one have algorithms for interviews by adnan aziz ebook... Please mail ...
please send me this book to my email , thanks manish.iitia...@gmail.com' On Sat, Apr 30, 2011 at 6:07 AM, Venkat gvr.su...@gmail.com wrote: Hey how's ur interview? if u have the book pls mail me to gvr.su...@gmail.com On Apr 19, 6:19 am, nagajyothi gunti nagajyothi.gu...@gmail.com wrote: Please send me too at nagajyothi.gu...@gmail.com Also, please let me know what all to prepare...I have an phone interview from amazon this wednesday. On Mon, Apr 18, 2011 at 2:40 PM, vaibhav agrawal agrvaib...@gmail.com wrote: Please send it to me tooo agrvaib...@gmail.com On Mon, Apr 18, 2011 at 10:30 PM, Rel Guzman Apaza rgap...@gmail.com wrote: Send to me too. Please. rgap...@gmail.com 2011/4/18 Abhishek Goswami zeal.gosw...@gmail.com I think we can share into email...that will not be any issue. :) On Mon, Apr 18, 2011 at 10:07 PM, Abhishek Goswami zeal.gosw...@gmail.com wrote: can u please me also .. zeal_gosw...@yahoo.com On Thu, Apr 14, 2011 at 11:50 AM, Himanshu Neema potential.himansh...@gmail.com wrote: Hi All , Yesterday I received an email from Author that this is *violation of Intellectual Property Ownership* ,So kindly please delete pdfs please remove all the sharing. Thanks Guys. Himanshu On Thu, Apr 14, 2011 at 10:52 AM, Harshal hc4...@gmail.com wrote: Thanks :) On Thu, Apr 14, 2011 at 9:59 AM, Rajeev Kumar rajeevprasa...@gmail.com wrote: check this link: https://docs.google.com/viewer?a=vpid=explorerchrome=truesrcid=1B5... If you have any problem in access,please inform me On Thu, Apr 14, 2011 at 1:04 AM, Abhishek Goswami zeal.gosw...@gmail.com wrote: Hi, I tried to open this book in google docs and got message that file is not avaliable. does this file not available in google docs if yes , can anybody share this book again On Tue, Mar 22, 2011 at 10:41 PM, Himanshu Neema potential.himansh...@gmail.com wrote: Turns out that I cant send file larger than 4 MB , please download it from here , let me know if you're still unable to download: http://dl.dropbox.com/u/2681370/Algorithms%2Bfor%2BInterviews%2B%28sc... have fun ! On Tue, Mar 22, 2011 at 10:21 PM, Himanshu Neema potential.himansh...@gmail.com wrote: Enjoy :) On Tue, Mar 22, 2011 at 10:09 PM, Saravanan T mail2sarava...@gmail.com wrote: ++ On Tue, Mar 22, 2011 at 9:51 PM, Anurag atri anu.anurag@gmail.com wrote: and me too :) On Tue, Mar 22, 2011 at 9:28 PM, Nikhil Mishra mishra00...@gmail.com wrote: count me too On Tue, Mar 22, 2011 at 11:16 AM, kunal srivastav kunal.shrivas...@gmail.com wrote: plz send it to me too On Tue, Mar 22, 2011 at 11:14 AM, D.N.Vishwakarma@IITR deok...@gmail.com wrote: -- *With Regards Deoki Nandan Vishwakarma IITR MCA Mathematics Department * -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- thezeitgeistmovement.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. -- Regards Anurag Atri -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com . To unsubscribe from 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
Re: [algogeeks] Re: Reading Huge input from the terminal in least time.
I had read in few articles that the unlocked version of fread and fwrite tends to crash more often.I tried with both,though my parsing algo was a bit redundant as compared to sankalp sir's the non unlocked fns were very slightly slower. .03s for 10^6 integers. On Wed, Apr 20, 2011 at 6:27 PM, sankalp srivastava richi.sankalp1...@gmail.com wrote: use this #includecstdio #includeiostream char ipos, opos, InpFile[2000], OutFile[2000], DIP[20]; inline int input(int flag=0) { while(*ipos = 32) ++ipos;//skips white spaces if ( flag ) return (*ipos++ - '0'); / For getting Boolean Characters */ int x=0, neg = 0;char c; while( true ) { c=*ipos++; if(c == '-') neg = 1; else { if (c=32) return neg?-x:x; x=(x1)+(x3)+c-'0'; } } } inline void output(int x,int flag) { int y,dig=0; if(x0){ *opos++='-'; x=-x;} while (x||!dig) { y=x/10;DIP[dig++]=x-((y 3) + (y 1))+'0';x=y;} while (dig--) *opos++=DIP[dig]; *opos++= flag ? '\n' : ' '; } inline void InitFASTIO() { ipos = InpFile; opos = OutFile; fread_unlocked(InpFile,2000,1,stdin); } inline void FlushFASTIO() { fwrite_unlocked(OutFile,opos-OutFile,1,stdout); } On Apr 20, 8:06 am, abhijith reddy abhijith200...@gmail.com wrote: You could read input character by character using getchar_unlocked() untill you hit a space or new line or EOF. Alternatively you read the whole input at once using fread_unlocked() and then process it as per your need. On Wed, Apr 20, 2011 at 7:41 AM, shubham shubh2...@gmail.com wrote: Hello Geeks, Suppose we have a 2-d array arr[1000][1000] capable of storing 10^6 elements in it. Input is supplied one row at a time. Then what is the best possible way to read this much data in the least amount of time as scanf() or cin takes a lot of time? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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.
Re: [algogeeks] Fwd: Problems
No Its not an assignment On Thu, Apr 28, 2011 at 6:40 PM, Umer Farooq the.um...@gmail.com wrote: This is an assignment. Ryt? :P On Thu, Apr 28, 2011 at 1:31 PM, D.N.Vishwakarma@IITR deok...@gmail.comwrote: * * *Just give some time to these problems and solve it. Its sort of Urgent.And Let me know the Solution. * 1. Write an algorithm to implement a stack using a two dimensional array. 2. Write an algorithm to store elements of a two-dimensional array in a simple stack. 3. You are in a rectangular area having one entry and one exit. The Entrance is at the upper-left corner and the exit is at the lower-right corner. The interior of the maze contains walls or obstacles that you can not walk through. These obstacles are placed along rows and columns that are parallel to the rectangular boundary of the maze. You can move north, south, east or west neighboring positions. Write an algorithm to find a path from entrance to exit using Stack data structure. 4.Bob has a set A of n nuts and a set B of n bolts such that each nut in A has a unique matching bolt in B. Unfortunately, the nuts in A all look the same, and the bolts in B all look the same as well. The only kind of a comparison that Bob can make is to take a nut-bolt pair (a,b), such that a belongs to A and B belongs to B, and test it to see if the threads of a are larger, smaller or a perfect match with the threads of B. Describe an efficient algorithm for Bob to match up all his nuts and bolts. 5. A 3 –ary tree consists of two data fields: name and Age. Design an algorithm for viewing the contents of all even numbered levels starting from last-level. In a level display all nodes from right to left. Root is at level 0. Thank You... -- **With Regards Deoki Nandan Vishwakarma IITR MCA Mathematics Department* * -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Umer -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 IITR MCA Mathematics Department* * -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.