Re: [algogeeks] Re: Algorithm page
Hi Wladimir, How can we access an english version? Thanks, Vaibhav On Thu, Apr 12, 2012 at 10:48 PM, Wladimir Tavares wladimir...@gmail.comwrote: New good posts: http://marathoncode.blogspot.com.br/2012/03/list-comprehension-e-generator.html http://marathoncode.blogspot.com.br/2012/03/projeto-de-algoritmos-usando-inducao.html http://marathoncode.blogspot.com.br/2012/03/jogo-nim.html http://marathoncode.blogspot.com.br/2012/03/alguns-truques-da-linguagem-c.html http://marathoncode.blogspot.com.br/2012/02/criterio-de-divisibilidade-por-3.html http://marathoncode.blogspot.com.br/2012/02/calculo-do-numero-de-combinacoes.html Wladimir Araujo Tavares *Federal University of Ceará http://lia.ufc.br/%7Ewladimir/ Homepage http://lia.ufc.br/%7Ewladimir/ | Maratonahttps://sites.google.com/site/quixadamaratona/| * On Tue, Feb 14, 2012 at 5:12 AM, rahul rahulr...@gmail.com wrote: @Wladimir, Nice articles. Thanks. Best Regards, Rahul. On Tue, Feb 14, 2012 at 5:05 AM, Wladimir Tavares wladimir...@gmail.comwrote: Hi Guys, I transfer some text for this blog. http://marathoncode.blogspot.com Some good posts: http://marathoncode.blogspot.com/2012/01/rand8-usando-rand5.html http://marathoncode.blogspot.com/2012/02/conhecimento-perigoso-parte-i.html http://marathoncode.blogspot.com/2012/02/metaprogramacao-x-spoj.html http://marathoncode.blogspot.com/2012/02/tutorial-sobre-xor.html http://marathoncode.blogspot.com/2012/02/encontrar-o-menor-entre-dois-inteiros.html Wladimir Araujo Tavares *Federal University of Ceará http://lia.ufc.br/%7Ewladimir/ Homepage http://lia.ufc.br/%7Ewladimir/ | Maratonahttps://sites.google.com/site/quixadamaratona/| * On Wed, Oct 5, 2011 at 7:11 PM, Wladimir Tavares wladimir...@gmail.comwrote: Hi Guys, I created this page to place some materials on algorithms. Suggestions are welcome. https://sites.google.com/site/quixadamaratona/ Ps: The page is in Portuguese. Best wishes, * * -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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.
[algogeeks] Intuit interview question
Hi, Any idea, what is the interview process of Intuit Inc.? I mean what do they concentrate on? Thanks, Vaibhav -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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]
Majorly software maintainence On Mon, Aug 15, 2011 at 12:17 AM, siddharth srivastava akssps...@gmail.comwrote: On 15 August 2011 00:15, sukran dhawan sukrandha...@gmail.com wrote: do they recruit software engineers for maintainenance? yes..and major chunk of projects are maintenance only On Mon, Aug 15, 2011 at 12:10 AM, siddharth srivastava akssps...@gmail.com wrote: On 15 August 2011 00:03, sukran dhawan sukrandha...@gmail.com wrote: hmmm k or even purely maintenance jobs where you may not get chance to code at all On Sun, Aug 14, 2011 at 11:47 PM, rashmi i rash...@gmail.com wrote: Infosys and TCS are consultancies. So, the type of job is not fixed. It depends on the type of project a client provides, so it may involve variety of technologies from C to Java , Perl,etc. On Sun, Aug 14, 2011 at 11:31 PM, sukran dhawan sukrandha...@gmail.com wrote: can anyone tell me what is the job provided by infosys and tcs? IF they do so much mass recruitment what kinda job the ppl get der? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- R@$!-! DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 Siddharth Srivastava -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 Siddharth Srivastava -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] C++ heap vs stack
On the heap... On Tue, Aug 9, 2011 at 10:22 AM, Mohit Goel mohitgoel291...@gmail.comwrote: In c++ we should allocate the memory for the object on the stack or on the heap? what effect it will have on the 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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Google Question
Why to do hashing?? rather generate a unique id everytime... On Fri, Jun 3, 2011 at 9:50 PM, Nate nate.archibal...@gmail.com wrote: How will you design a site similar to tinyurl.com? Simple hashing may require a lot of space, and collisions is another issue. Any other approch other than just hashing? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] [brain teaser] Pirate Puzzle 21april
Why the two pirates would agree when they are getting only one coins each? On Thu, Apr 21, 2011 at 3:05 PM, harshit agrawal hagrawal.250...@gmail.comwrote: thwy will be shared according to senior most pirate(5th)=98 4th =0 3rd =1 2nd=0 1st =1 On Thu, Apr 21, 2011 at 2:54 PM, Anders Ma xuejiao...@gmail.com wrote: the coins will be shared the way the oldest pirate proposes. On Thu, Apr 21, 2011 at 3:51 PM, Lavesh Rawat lavesh.ra...@gmail.com wrote: Pirate Puzzle 5 pirates of different ages have a treasure of 100 gold coins. On their ship, they decide to split the coins using this scheme: The oldest pirate proposes how to share the coins, and all pirates remaining will vote for or against it. If 50% or more of the pirates vote for it, then the coins will be shared that way. Otherwise, the pirate proposing the scheme will be thrown overboard, and the process is repeated with the pirates that remain. Assuming that all 5 pirates are intelligent, rational, greedy, and do not wish to die, (and are rather good at math for pirates) what will happen? Update Your Answers at : Click Here 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. -- Regards Anders -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 Agrawal 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.
Re: [algogeeks] [brain teaser] Pirate Puzzle 21april
They can still disagree and the pirate would be thrown out as the puzzle states On Thu, Apr 21, 2011 at 3:21 PM, durgaprasad k durga...@gmail.com wrote: @vaibhav : if they dont agree for 1 gold icon they will be thrown out. so they will accept the 1 gold coin to stay on . On Thu, Apr 21, 2011 at 3:10 PM, vaibhav agrawal agrvaib...@gmail.comwrote: Why the two pirates would agree when they are getting only one coins each? On Thu, Apr 21, 2011 at 3:05 PM, harshit agrawal hagrawal.250...@gmail.com wrote: thwy will be shared according to senior most pirate(5th)=98 4th =0 3rd =1 2nd=0 1st =1 On Thu, Apr 21, 2011 at 2:54 PM, Anders Ma xuejiao...@gmail.com wrote: the coins will be shared the way the oldest pirate proposes. On Thu, Apr 21, 2011 at 3:51 PM, Lavesh Rawat lavesh.ra...@gmail.com wrote: Pirate Puzzle 5 pirates of different ages have a treasure of 100 gold coins. On their ship, they decide to split the coins using this scheme: The oldest pirate proposes how to share the coins, and all pirates remaining will vote for or against it. If 50% or more of the pirates vote for it, then the coins will be shared that way. Otherwise, the pirate proposing the scheme will be thrown overboard, and the process is repeated with the pirates that remain. Assuming that all 5 pirates are intelligent, rational, greedy, and do not wish to die, (and are rather good at math for pirates) what will happen? Update Your Answers at : Click Here 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. -- Regards Anders -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 Agrawal 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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 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 Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Thank You Rajeev Kumar -- You received this message because you are subscribed to the Google Groups
Re: [algogeeks] Sort array with two subparts sorted
Maintain two pointers, and swap elements... On Tue, Apr 12, 2011 at 4:42 PM, Akash Agrawal akash.agrawa...@gmail.comwrote: This is obvious solution what if u have contant space? Regards, Akash Agrawal http://tech-queries.blogspot.com/ On Tue, Apr 12, 2011 at 3:48 PM, rajul jain rajuljain...@gmail.comwrote: use merge sort On Tue, Apr 12, 2011 at 3:07 PM, Akash Agrawal akash.agrawa...@gmail.com wrote: Given an array with two subparts sorted. How will you make a final sorted array. i/p: 1, 5, 7, 9, 11, 23, 2, 3, 8, 9, 21 o/p: 1, 2, 3, 5, 7, 8, 9, 9, 11, 21, 23 Regards, Akash Agrawal http://tech-queries.blogspot.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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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 Implement a HashMap
For implementing a HashMap, I believe following things need to be determined: 1. Good Hashing Function 2. Allocation of an array of pointers containing the structure of the key and values to be stored. The size of array could be determined, based on the number of key/value pairs to be stored, and how much memory is available or how fast we want the HashMap to work. Working: 1. Storage: Any key/value pair need to be stored, the key would be passed to the hash function to get the index of the array where the key/value pair need to be stored. If already a key/value is stored there, then a chain would be created. 2. Look-up: Any key which need to be looked upon, the key would be passed to the hash function to get the index of the array where the key/value pair is stored. The chain stored at that index, would be then looked sequentially to find out the value. If none of the node contains the key, then key is not present in HashMap. Thanks, Vaibhav On Sun, Apr 3, 2011 at 6:52 PM, rAun007 raunak.ra...@gmail.com wrote: Hi Geeks, I was trying to find a good approach to implement a Hash Map of your own but got confused by searching the answer on the net. It would be very much appreciated if we can discuss different approaches and the best way to implement the same. Regards, Raunak -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Interview questions for multithreading in Java
Hi, What interview questions one would expect for multi-threading? Thanks, Vaibhav -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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] Interview questions for multithreading in Java
Thanks Abhishek! I was looking for something in Java On Tue, Mar 8, 2011 at 11:13 PM, Abhishek Goswami zeal.gosw...@gmail.comwrote: I think you can go some basic concept which help you. I have collected some info about threading . hope so it will little bit useful http://www.cppcoffe.blogspot.com/ On Tue, Mar 8, 2011 at 9:35 PM, Abhishek Sharma jkabhishe...@gmail.comwrote: u can go through the following questions...not sure about the answers...: 1) What are the two types of multitasking? Ans : 1.process-based 2.Thread-based 2) What are the two ways to create the thread? Ans : 1.by implementing Runnable 2.by extending Thread 3) What is the signature of the constructor of a thread class? Ans : Thread(Runnable threadob,String threadName) 4) What are all the methods available in the Runnable Interface? Ans : run() 5) What is the data type for the method isAlive() and this method is available in which class? Ans : boolean, Thread 6) What are all the methods available in the Thread class? Ans : 1.isAlive() 2.join() 3.resume() 4.suspend() 5.stop() 6.start() 7.sleep() 8.destroy() 7) What are all the methods used for Inter Thread communication and what is the class in which these methods are defined? Ans :1. wait(),notify() notifyall() 2. Object class 8) What is the mechanisam defind by java for the Resources to be used by only one Thread at a time? Ans : Synchronisation 9) What is the procedure to own the moniter by many threads? Ans : not possible 10) What is the unit for 1000 in the below statement? ob.sleep(1000) Ans : long milliseconds 11) What is the data type for the parameter of the sleep() method? Ans : long 12) What are all the values for the following level? max-priority min-priority normal-priority Ans : 10,1,5 13) What is the method available for setting the priority? Ans : setPriority() 14) What is the default thread at the time of starting the program? Ans : main thread 15) The word synchronized can be used with only a method. True/ False Ans : False 16) Which priority Thread can prompt the lower primary Thread? Ans : Higher Priority 17) How many threads at a time can access a monitor? Ans : one 18) What are all the four states associated in the thread? Ans : 1. new 2. runnable 3. blocked 4. dead 19) The suspend()method is used to teriminate a thread? True /False Ans : False 20) The run() method should necessary exists in clases created as subclass of thread? True /False Ans : True 21) When two threads are waiting on each other and can't proceed the programe is said to be in a deadlock? True/False Ans : True 22) Which method waits for the thread to die ? Ans : join() method 23) Which of the following is true? 1) wait(),notify(),notifyall() are defined as final can be called only from with in a synchronized method 2) Among wait(),notify(),notifyall() the wait() method only throws IOException 3) wait(),notify(),notifyall() sleep() are methods of object class 1 2 3 1 amp; 2 1,2 3 Ans : D 24) Garbage collector thread belongs to which priority? Ans : low-priority 25) What is meant by timeslicing or time sharing? Ans : Timeslicing is the method of allocating CPU time to individual threads in a priority schedule. 26) What is meant by daemon thread? In java runtime, what is it's role? Ans : Daemon thread is a low priority thread which runs intermittently in the background doing the garbage collection operation for the java runtime system On Tue, Mar 8, 2011 at 9:16 PM, Abhishek Sharma jkabhishe...@gmail.comwrote: what do u mean by multi-threading :P On Tue, Mar 8, 2011 at 7:37 PM, vaibhav agrawal agrvaib...@gmail.comwrote: Hi, What interview questions one would expect for multi-threading? Thanks, Vaibhav -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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
Re: [algogeeks] Application of Data Structure
Hash, SortedSet On Wed, Feb 16, 2011 at 9:58 PM, bittu shashank7andr...@gmail.com wrote: Given a set of words one after another, give a data structure so that you,will know whether a word has appeared already or not. 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. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from 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]
@ankit: how x is 20? On Sat, Feb 5, 2011 at 4:46 PM, ankit sablok ankit4...@gmail.com wrote: x is 20 for sure and y i m guessing to be 1 comma operator and 0 used for octal constnts On Sat, Feb 5, 2011 at 3:01 PM, radha krishnan radhakrishnance...@gmail.com wrote: guess the output main() { int x=(1,024),y; y=1,024; printf(%d %d,x,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.comalgogeeks%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.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%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.com. To unsubscribe from 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] Adobe Question
are they sorted? On Fri, Jan 14, 2011 at 3:35 PM, bittu shashank7andr...@gmail.com wrote: how to find if two arrays of size n are disjoint or not in O(n) time ?? You can use only O(n) space The elements are +ve in the range 0 to n power 100.. Regards Shashank Mani -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%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.com. To unsubscribe from 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] Building A Special Tree
If it is a BST...then having a pre-order traversal can give us the unique binary tree. Also, as per the problem statement, every node can have 0 or at most 2 nodes. that means every node can have 0 or two childs, which is not the case below. On Fri, Jan 14, 2011 at 6:49 PM, Balaji Ramani rbalaji.psgt...@gmail.comwrote: Two different binary trees can have same set of Leaves/Inner Nodes and same Preorder traversal 5 / \ 3 10 / \ 1 9 \ 7 5 / \ 3 9 / / \ 1 7 10 So, I guess it is not solvable unless we have some more information. Thanks, Balaji. On Fri, Jan 14, 2011 at 10:50 AM, Decipher ankurseth...@gmail.com wrote: A special type of tree is given, where all leaf are marked with L and others are marked with N. every node can have 0 or at most 2 nodes. Trees preorder traversal is given give a algorithm to build tree from this traversal. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%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.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%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.com. To unsubscribe from 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] Find The Looping Node
@snehal But it doesn't seem to find the node where loop begins... On Wed, Dec 22, 2010 at 9:56 PM, snehal jain learner@gmail.com wrote: @ above well this a ver old and easy problem.. but unlike u, criticizing others wen u knw the solution i wud rather post my solution.. int removeCycle(list head) { struct listnode * slow, *fast,*slow; slow=fast=head; do { if(!fast || ! fast-next) rteurn -1; slow=slow-next; fast=fast-next-next; } while(slow!=fast); slow1=head; while( slow1!=slow) { prev=slow; slow=slow-next; slow1=slow1-next; } prev-next=null; return 1; } well this is the code for solving ur prob.. but i hv nt attached y this works.. i hope u ll work out on this.. rather than having spoon feeding.. still if u cant work out, u can ask it.. i would love to answer and explain to a genius (/ or the person who considers himself genius and the one who considers others doubts as homework problem and his own doubts as a big tricky problem although it is too old and common problem :P). On Wed, Dec 22, 2010 at 9:11 PM, Saurabh Koar saurabhkoar...@gmail.comwrote: Finding whether a loop exists or not in a linked list, is a very familiar problem.But I want an algorithm that will find the node that is causing the loop. Well,I have an approach.Start from the head.Copy its data into an array.Mark node's data as infinity.Move to the next node.When u find node-next-data=infinity u will say that the current node is causing the loop.Then restore the data of the linked list from the array.But I think more optimized algorithm is possible.Reply if you know more optimized way. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%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 algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%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 algoge...@googlegroups.com. To unsubscribe from 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: Google Interview Question
@Douglas, nicely put!!! On Fri, Jan 7, 2011 at 8:37 PM, Douglas Diniz dgdi...@gmail.com wrote: Some examples, supposing you do always the same thing: 1-) You have a program that use some random number, and based on the number the program do different things, and this different things crash the program at different places. 2-) you have a program that connect with a external server. Depending on the links status you could crash in different places. 3-) You have a program that talk with another program (or external server) through a protocol, and the protocol could do different things even if you do the same thing several times. 4-) Your program has timeouts that could expire based on the system usage, crashing the program in different places. 5-) Your program read some system variable and do different things. 6-) etc On Fri, Jan 7, 2011 at 12:09 PM, juver++ avpostni...@gmail.com wrote: The application is single threaded :) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%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 algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%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 algoge...@googlegroups.com. To unsubscribe from 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] multisorted aarray
Merge Sort on rows?? On Wed, Nov 24, 2010 at 8:50 PM, MAC macatad...@gmail.com wrote: You are given a array with rows sorted and column sorted. You have to print entire array in sorted order .. any idea?? -- thanks --mac -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%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 algoge...@googlegroups.com. To unsubscribe from 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] Lookup in a table...
Hello All, I have a problem, which needs to be solved for lesser time complexity. Here it goes: There is a file having two columns: id and key as under: 1|A 2|A 3|A 4|A 5|A 1|B 2|B 3|B 4|B 6|B and so on... Now, we want to lookup a bunch of ids(constant 5) to get a key, that means if we lookup on id as {2,1,4,3,6}, then we should get return key as 'D' and so on... I am proposing a solution for this as under: Construct two hashes: First hash(based on above data):(Hash Key=Hash Set) 1={A,B} 2={A,B} 3={A,B} 4={A,B} 5={A} 6={B} Second hash(based on above data):(Hash Key=Hash Set) A={1,2,3,4,5} B={1,2,3,4,6} Now, for the given example ids as {2,1,4,3,6}, we will start looking up first element '2' into first hash, and got the list {A,B}, so the desired key could be either A or B. Now, let's consider A first using second hash, we got a list of ids {1,2,3,4,5}, now match these ids with the inputted bunch(2,1,4,3,6}, which is not matching. Now consider B, which got list of ids as (1,2,3,4,6}, which matches with the input and hence the answer is B. Is there any way in which it can be further optimized for speed? Thanks, Vaibhav -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: divide and conquer question
Hi Dave, How can we do a binary search on this array by using the function: Let f(i) = A[i] - i Please elaborate. I mean how can we take a decision whether to look into left or right. For example - Pick array {1,2,2,4,5,6,8} Vaibhav On Wed, Nov 3, 2010 at 6:44 PM, Dave dave_and_da...@juno.com wrote: @Lichenga2404: Assuming that the array is sorted into increasing order: If A[1] 1 or A[n] n, return false. Let f(i) = A[i] - i. Do a binary search to find i such that f(i) = 0. If such an i is found, return true; else return false. Binary search is O(log n). It works because f(i) is an increasing function, making it amenable to binary search. Dave On Nov 3, 2:54 am, lichenga2404 lichenga2...@gmail.com wrote: we are given a sorted array A[1...n] , composed of distinct integers, (the values can be negative). We want to determine if there is an index i such that A[i] = i. Give an O(logn) algorithm to solve this problem , and justify its correctness -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%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 algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.