[algogeeks] Re: Amazon Interview Q

2011-08-18 Thread Vijay Kansal
We should return curr-next in the last statement of ur code On Aug 18, 7:08 am, Dipankar Patro dip10c...@gmail.com wrote: A slight change in above code: make it while(cur cur-next) ^^ other wise the code will crash at last element in a prefect list, with no loop. On 18 August 2011 07:36,

Re: [algogeeks] Re: |a-b| + |b-c| + |c-a|

2011-08-18 Thread Anantha Krishnan
Let, min_dif=INT_MAX 1.Sort the N arrays A,B,C. 2.Find the minimum and maximum of A[0],B[0],C[0]. 3.Take the difference between MAX-MIN values. 5.If the difference is less than min_dif then update min_dif and save all n values. 6.Now increment the index of the array which contains

Re: [algogeeks] Re: |a-b| + |b-c| + |c-a|

2011-08-18 Thread MAC
as per my understanding , you are increasing the minimum value so that it reaches closer to the maximum others that we are not moving right now . Why are you not moving the maximum instead ? basically i need the reason why you are doing so .. thanks --mac; On Thu, Aug 18, 2011 at 12:08 PM,

Re: [algogeeks] Re: Urgent...plz help

2011-08-18 Thread Ankur Garg
U can use selection Algorithm to achieve the same ...it has got expected running time complexity as O(n) ...Read Wikipedia to see the proper implementation.. Just some tweak with Quick Sort ..Also there is one method median of medians one which has worst case complexity as O(n) Regards Ankur

Re: [algogeeks] Re: |a-b| + |b-c| + |c-a|

2011-08-18 Thread Anantha Krishnan
If we move the maximum then difference will get larger but our aim is to minimize the difference. Thanks Regards, Anantha Krishnan On Thu, Aug 18, 2011 at 1:01 PM, MAC macatad...@gmail.com wrote: as per my understanding , you are increasing the minimum value so that it reaches closer to the

Re: [algogeeks] Re: Urgent...plz help

2011-08-18 Thread Apoorve Mohan
Create a B+ tree and extract the first 100 leaf nodes On Thu, Aug 18, 2011 at 1:05 PM, Ankur Garg ankurga...@gmail.com wrote: U can use selection Algorithm to achieve the same ...it has got expected running time complexity as O(n) ...Read Wikipedia to see the proper implementation..

[algogeeks] Re: Makemytrip.com

2011-08-18 Thread monish001
What level of questions for each- english, aptitute, coding? Can you discuss some? -Monish On Aug 5, 10:22 pm, parag khanna khanna.para...@gmail.com wrote: half an hour Aptitude test , after that half an hour written test , then Technical rounds (2-3) and then HR profile Software dev - 6

[algogeeks] Re: Make My Trip *URGENT*

2011-08-18 Thread monish001
What level of questions for each- english, aptitute, coding? Can you discuss some? -Monish On Aug 17, 5:06 pm, Anika Jain anika.jai...@gmail.com wrote: there will be 15 english fill in the blanks, 5 series questn, 10 aptitude questions, 10 logical questions.. then 10 c++ mcqs and 5 coding

[algogeeks] threads

2011-08-18 Thread Aman Kumar
Hiii Tell me that what should i answer in interview of question like 1.thread synchronization 2.context switch of threads please give detail answer. any good link for same? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: [algogeeks] Re: |a-b| + |b-c| + |c-a|

2011-08-18 Thread MAC
in the example below , answer shd be 0 , . by your apraoch this is not commig 10,25,35 10,25,30 5 ,6,25,30 On Thu, Aug 18, 2011 at 1:08 PM, Anantha Krishnan ananthakrishnan@gmail.com wrote: If we move the maximum then difference will get larger but our aim is to minimize the

Re: [algogeeks] Re: |a-b| + |b-c| + |c-a|

2011-08-18 Thread Anantha Krishnan
Yes with my approach answer will be 0. Please check here http://ideone.com/Q4ivj. Thanks Regards, Anantha Krishnan On Thu, Aug 18, 2011 at 1:33 PM, MAC macatad...@gmail.com wrote: in the example below , answer shd be 0 , . by your apraoch this is not commig 10,25,35 10,25,30 5

Re: [algogeeks] Re: Urgent...plz help

2011-08-18 Thread Apoorve Mohan
or rather u can just have 100 iterations of selection sort...u'll get the min 100 iterations...and this is inplace as well... On Thu, Aug 18, 2011 at 1:18 PM, Apoorve Mohan apoorvemo...@gmail.comwrote: Create a B+ tree and extract the first 100 leaf nodes On Thu, Aug 18, 2011 at 1:05 PM,

Re: [algogeeks] Re: Urgent...plz help

2011-08-18 Thread payal gupta
i agree with amol it cud be max-heap only... Regards, PAYAL GUPTA On Thu, Aug 18, 2011 at 2:26 PM, Apoorve Mohan apoorvemo...@gmail.comwrote: or rather u can just have 100 iterations of selection sort...u'll get the min 100 iterations...and this is inplace as well... On Thu, Aug 18,

[algogeeks] PLEASE MAKE SINCERE DONATION EVEN A SINGLE RUPEE MATTERS

2011-08-18 Thread monty 1987
Hi ALL, It is neither a issue of any sick person , it is the issue that mother India is sick with corrupt people. I know that most of us do not have time due to a busy schedule but we have other resources with us. I am not man of very high stature still i implore u all to contribute

[algogeeks] Re: exit() vs. _exit()

2011-08-18 Thread Amol Sharma
anyone ?? -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad On Thu, Aug 18, 2011 at 10:40 AM, Amol Sharma amolsharm...@gmail.comwrote: what is the difference between exit() and _exit http://ideone.com/MCzGy http://ideone.com/SxbwT when i am using

Re: [algogeeks] Re: Amazon Interview Q

2011-08-18 Thread Dipankar Patro
we can do that too. But if I return cur then I can myself print cur, cur-next, cur-next-prev. for verification. On 18 August 2011 11:56, Vijay Kansal vijaykans...@gmail.com wrote: We should return curr-next in the last statement of ur code On Aug 18, 7:08 am, Dipankar Patro

Re: [algogeeks] Re: exit() vs. _exit()

2011-08-18 Thread Abhishek Sharma
exit() calls clean up codes (flushing the buffer etc) while _exit() does not.. FYI- pls use google for such questions. Regards, Abhishek On Thu, Aug 18, 2011 at 3:26 PM, Amol Sharma amolsharm...@gmail.com wrote: anyone ?? -- Amol Sharma Third Year Student Computer Science and

Re: [algogeeks] Re: exit() vs. _exit()

2011-08-18 Thread sagar pareek
Well i dont know about ur case but _exit() is use to exit from current process only like to exit child in fork() and exit() is use to exit whole process tree On Thu, Aug 18, 2011 at 3:26 PM, Amol Sharma amolsharm...@gmail.com wrote: anyone ?? -- Amol Sharma Third Year Student Computer

[algogeeks] MS BRAINTEASR

2011-08-18 Thread pg@manit
A bunch of men are on an island. A genie comes down and gathers everyone together and places a magical hat on some people’s heads (i.e., at least one person has a hat). The hat is magical: it can be seen by other people, but not by the wearer of the hat himself. To remove the hat, those (and only

[algogeeks] Any body have idea about samsung india recruitment...

2011-08-18 Thread Ankit singh
hi, is there any1 who appeared for samsung india,i want to know what type of questions asked in the written test and interview.and please also tell that what was the eligibility criteria for written test.the company will be coming on 24 in our college. friends please reply... Ankit Singh

[algogeeks] Re: MS BRAINTEASR

2011-08-18 Thread DheerajSharma
it would take c days to take off all the hats On Aug 18, 3:51 pm, pg@manit gpt.pa...@gmail.com wrote: A bunch of men are on an island. A genie comes down and gathers everyone together and places a magical hat on some people’s heads (i.e., at least one person has a hat). The hat is magical: it

Re: [algogeeks] Re: MS BRAINTEASR

2011-08-18 Thread payal gupta
hmm...suitable rply i suppose thanx...:):) REGARDS, PAYAL GUPTA On Thu, Aug 18, 2011 at 4:36 PM, DheerajSharma dheerajsharma1...@gmail.comwrote: it would take c days to take off all the hats On Aug 18, 3:51 pm, pg@manit gpt.pa...@gmail.com wrote: A bunch of men are on an island. A

[algogeeks] Re: MS BRAINTEASR

2011-08-18 Thread DheerajSharma
Case 1: when one person is wearing hat.The person wearing hat will see that no other is wearing hat.hence he must be wearing it.So she will take it off.hence one day Case 2: when two persons are wearing,first will think..that only second one is wearing..while second will think only first one is

[algogeeks] Re: MS BRAINTEASR

2011-08-18 Thread DheerajSharma
ur welcume :) On Aug 18, 4:12 pm, payal gupta gpt.pa...@gmail.com wrote: hmm...suitable rply i suppose thanx...:):) REGARDS, PAYAL GUPTA On Thu, Aug 18, 2011 at 4:36 PM, DheerajSharma dheerajsharma1...@gmail.comwrote: it would take c days to take off all the hats On

[algogeeks] Re: Any body have idea about samsung india recruitment...

2011-08-18 Thread DheerajSharma
samsung SISO would be coming day after tomm. in our collg..would tell u the details..howevel..samsung SEL visited..our collg few dayz..back..there was first an aptitude paper..having logical reasoning and pie chart type questions..that were very very easy..and the question booklet they provided..

[algogeeks] Re: Any body have idea about samsung india recruitment...

2011-08-18 Thread geek_one
search the group -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/cNG6SvbGoMAJ. To post to this group, send email to algogeeks@googlegroups.com. To

Re: [algogeeks] Novell questions

2011-08-18 Thread Nitin Gupta
can anyone post some written and interview question asked by Novell? On Thu, Aug 11, 2011 at 11:17 PM, mohit verma mohit89m...@gmail.com wrote: +1 On Thu, Aug 11, 2011 at 11:14 PM, manvir siyo manis...@gmail.com wrote: can anyone tell me abt the written test of d e shaw On Thu, Aug 11,

[algogeeks] Adobe off campus event

2011-08-18 Thread anon
Has anyone recently appeared for Adobe off campus event? The profile is C/C++ programming as MTS. It is for 1 yr experienced or more candidates. Any pointers for its preparation are welcome :) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group.

Re: [algogeeks] Re: Any body have idea about samsung india recruitment...

2011-08-18 Thread Ankit singh
thanks *Ankit Singh * On Thu, Aug 18, 2011 at 4:51 PM, DheerajSharma dheerajsharma1...@gmail.comwrote: samsung SISO would be coming day after tomm. in our collg..would tell u the details..howevel..samsung SEL visited..our collg few dayz..back..there was first an aptitude paper..having

[algogeeks] Amazon Question

2011-08-18 Thread Ankur Garg
Define a data structure , using extra memory/space , such that : Insert(int a) Delete(int a) isPresent(int a) get(int a) All above operations on the defined data structure take O(1) , i.e. constant time. Any suggestions /solutions for this problem Regards Ankur -- You received this

Re: [algogeeks] Amazon Question

2011-08-18 Thread sagar pareek
Hashing :) On Thu, Aug 18, 2011 at 5:30 PM, Ankur Garg ankurga...@gmail.com wrote: Define a data structure , using extra memory/space , such that : Insert(int a) Delete(int a) isPresent(int a) get(int a) All above operations on the defined data structure take O(1) , i.e. constant time.

Re: [algogeeks] Amazon Question

2011-08-18 Thread Ankur Garg
Can u provide a bit detail bro !! On Thu, Aug 18, 2011 at 8:04 AM, sagar pareek sagarpar...@gmail.com wrote: Hashing :) On Thu, Aug 18, 2011 at 5:30 PM, Ankur Garg ankurga...@gmail.com wrote: Define a data structure , using extra memory/space , such that : Insert(int a) Delete(int a)

[algogeeks] Re: |a-b| + |b-c| + |c-a|

2011-08-18 Thread WgpShashank
Hey Mac, Coded it Sometimes back , Have a Look(i know its naive way :D) so let me know if anything wrong , we can use Min-Heap to make solution efficient isn't it ? http://shashank7s.blogspot.com/2011/06/given-3-arrays-pick-3-nos-one-from-each.html Thanks Shashank Mani Computer Science

Re: [algogeeks] Amazon Question

2011-08-18 Thread Anantha Krishnan
We can use hash to do all the operations in O(1) time. Thanks Regards, Anantha Krishnan On Thu, Aug 18, 2011 at 5:30 PM, Ankur Garg ankurga...@gmail.com wrote: Define a data structure , using extra memory/space , such that : Insert(int a) Delete(int a) isPresent(int a) get(int a) All

Re: [algogeeks] Amazon Question

2011-08-18 Thread Anantha Krishnan
Refer here http://ideone.com/X77wm. On Thu, Aug 18, 2011 at 5:36 PM, Ankur Garg ankurga...@gmail.com wrote: Can u provide a bit detail bro !! On Thu, Aug 18, 2011 at 8:04 AM, sagar pareek sagarpar...@gmail.comwrote: Hashing :) On Thu, Aug 18, 2011 at 5:30 PM, Ankur Garg

Re: [algogeeks] Amazon Question

2011-08-18 Thread sagar pareek
Common yaar its very simple it is good for u to go in deep hence google it or refer a good data structure book On Thu, Aug 18, 2011 at 5:36 PM, Ankur Garg ankurga...@gmail.com wrote: Can u provide a bit detail bro !! On Thu, Aug 18, 2011 at 8:04 AM, sagar pareek sagarpar...@gmail.comwrote:

[algogeeks] Re: Amazon Interview Q

2011-08-18 Thread WgpShashank
Hi Piyuesh Same Question i Faced Some Times Ago, Have a look at algo/code let me know if any test case missed ? http://shashank7s.blogspot.com/2011/05/wap-to-detect-loop-in-doubly-linked.html if we wants to remove loop from DLL, we can do in the same way we used to do for singly linked

[algogeeks] Need to Hire an algorithm expert for a one time assignment

2011-08-18 Thread maxpayne
Hi, I need help from some one who is really good at algorithms to finish an assignment. I am a freelancer (not a student, so don't expect homework problems) based in Singapore and unfortunately I do not have a back ground in algorithms. I will really appreciate it if some one in this group can

Re: [algogeeks] Re: Possible solutions to these sort of Questions

2011-08-18 Thread Kunal Patil
+1 Yasir. On Wed, Aug 17, 2011 at 11:39 PM, Yasir yasir@gmail.com wrote: For questions specifically asking about test cases, I would suggest following 3 step approach: First think of a* basic flow that MUST work for the application* (what is expected with the application. Firstly make

[algogeeks] longest repeated substring

2011-08-18 Thread MAC
A string can have many sub-strings inside it . find the longest substring which is repeated maximum number of times. in case of 2 options repeated same number of times , largest one needs to be ouput and in case same length and same number of times repeated , anyone can be outputted.

Re: [algogeeks] longest repeated substring

2011-08-18 Thread hary rathor
suffix tree is best -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit

[algogeeks] Re: Need to Hire an algorithm expert for a one time assignment

2011-08-18 Thread Don
Why not post your questions, one per thread, and let people discuss it? Don On Aug 18, 7:41 am, maxpayne aquarian.thun...@gmail.com wrote: Hi, I need help from some one who is really good at algorithms to finish an assignment. I am a freelancer (not a student, so don't expect homework

Re: [algogeeks] Amazon Question

2011-08-18 Thread hary rathor
bitset is best . require only 32 time less then require in hash table . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

[algogeeks] Re: knight's tour - variant

2011-08-18 Thread Don
1.0. A knight's only legal move is to remain on the board. On Aug 17, 10:27 am, Seshumadhav Chaturvedula seshumad...@gmail.com wrote: what is the probability that a knight will stay on a K X K chess board after 'n' steps ? -- You received this message because you are subscribed to the Google

[algogeeks] Re: longest repeated substring

2011-08-18 Thread DheerajSharma
O(n^2) i guess.. We can save all possible substrings..(in two loops it can be done) in a hash map..as key..and the value as COUNT..then we can..search for the most occurring substring!! u said for non - efficient ;) On Aug 18, 6:07 pm, MAC macatad...@gmail.com wrote: A string can have many

[algogeeks] Re: Amazon Question

2011-08-18 Thread DheerajSharma
bitset would work i guess On Aug 18, 7:10 pm, hary rathor harry.rat...@gmail.com wrote: bitset is best . require only 32 time less then require in hash table . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email

[algogeeks] Re: longest repeated substring

2011-08-18 Thread DheerajSharma
suffix tree is obvsly best..but hard to code at interview!! On Aug 18, 7:20 pm, DheerajSharma dheerajsharma1...@gmail.com wrote: O(n^2) i guess.. We can save all possible substrings..(in two loops it can be done) in a hash map..as key..and the value as COUNT..then we can..search for the most

Re: [algogeeks] Re: longest repeated substring

2011-08-18 Thread Arun Vishwanathan
am just asking but how can u get all possible substrings in O(n square) time when there are 2 power N of them actually? On Thu, Aug 18, 2011 at 4:20 PM, DheerajSharma dheerajsharma1...@gmail.comwrote: O(n^2) i guess.. We can save all possible substrings..(in two loops it can be done) in a

[algogeeks] Re: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Don
exp(ln(a)-ln(b)) On Aug 18, 8:56 am, radha krishnan radhakrishnance...@gmail.com wrote: how to do using BIT manipulation ? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To

[algogeeks] atrenta paper

2011-08-18 Thread deepikaanand
plz sm1 from NSIT upload Arenta qs paper -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com.

[algogeeks] Re: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Dave
@Don: Try it with a = b = -1. Dave On Aug 18, 9:45 am, Don dondod...@gmail.com wrote: exp(ln(a)-ln(b)) On Aug 18, 8:56 am, radha krishnan radhakrishnance...@gmail.com wrote: how to do using BIT manipulation ? -- You received this message because you are subscribed to the Google Groups

[algogeeks] Re: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Dave
@Radha: You could simulate long division. It would look something like this: int divide(int a, int b) { int i, k=0, q=0, s=1; // error checking if( b == 0 ) return 0 // return 0 for division by zero // handle signs if( a 0 ) { a = -a; s = -1; } if( b 0 )

[algogeeks] Question from Google interview

2011-08-18 Thread Navneet Gupta
Given a string containing multiple words such that spaces between words is missing. Also, you have a dictionary containing valid words. Ex. Thatwouldbefantastic Output a string with proper spaces inserted. Output - That would be fantastic The case of words like bandwidth present can be

Re: [algogeeks] Re: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread aditya kumar
how abt subtracting . like a=a-b till a becomes zero . no of times subtraction is done is the answer . correct me if i am wrong ! On Thu, Aug 18, 2011 at 8:59 PM, Dave dave_and_da...@juno.com wrote: @Radha: You could simulate long division. It would look something like this: int divide(int

Re: [algogeeks] Question from Google interview

2011-08-18 Thread aditya kumar
not sure abt the algo but we can think in terms of tokeninzing . ie go for greedy method . greedy looks for maximum match . extract the token and match with the dictionary word . if match found then add the additional space else look for next token . On Thu, Aug 18, 2011 at 9:10 PM, Navneet Gupta

[algogeeks] Re: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread DheerajSharma
wat about shifting 'a' right by floar(log2(b)) and adding 1 to it.. On Aug 18, 8:48 pm, aditya kumar aditya.kumar130...@gmail.com wrote: how abt subtracting . like a=a-b till a becomes zero . no of times subtraction is done is the answer . correct me if i am wrong ! On Thu, Aug 18,

Re: [algogeeks] Adobe off campus event

2011-08-18 Thread rubal singh
Is Adobe open now for offcampus recruitment?? Regards Rubal Singh On Thu, Aug 18, 2011 at 5:11 PM, anon kaustubh.c...@gmail.com wrote: Has anyone recently appeared for Adobe off campus event?  The profile is C/C++ programming as MTS. It is for 1 yr experienced or more candidates. Any

[algogeeks] Re: Any body have idea about samsung india recruitment...

2011-08-18 Thread Abhishek gupta
search the group -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/-uBb8iSPXTQJ. To post to this group, send email to algogeeks@googlegroups.com. To

Re: [algogeeks] Re: Urgent...plz help

2011-08-18 Thread PramodP
When the interviewer says there are a million numbers to consider, it might mean that we don't have enough memory to hold all those in a single datastructure. In which case Dave's solution of using a heap of size 100 is the better one I suppose. I am sure a B+ tree takes O(nlogn to the base b)

Re: [algogeeks] Re: Amazon Question

2011-08-18 Thread siddharam suresh
use (dynamic/ infinite)array initial the array with -1. insert(int a) { array[a]=a; } delete(int a) { array[a]=-1; } .. Thank you, Siddharam On Thu, Aug 18, 2011 at 7:54 PM, DheerajSharma dheerajsharma1...@gmail.comwrote: bitset would work i guess On Aug 18, 7:10 pm, hary rathor

[algogeeks] Re: Question from Google interview

2011-08-18 Thread Dave
@Aditya: You probably have to be a bit more careful than that. You can't add the space until both the first part is a word in the dictionary and the rest of the string can also be broken into words in the dictionary. Consider Ballsareround. Your algorithm seems to put a space after the second l,

[algogeeks] Re: Urgent...plz help

2011-08-18 Thread Dave
@Ankur: When k = 100, the heap method I proposed is O(n). And if you have to program it from scratch, it is a lot easier than the median of medians algorithm. Dave On Aug 18, 2:35 am, Ankur Garg ankurga...@gmail.com wrote: U can use selection Algorithm to achieve the same ...it has got expected

[algogeeks] Re: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Dave
@Aditya: Not wrong, but inefficient and inelegant. Repeated subtraction has complexity O(quotient), while long division has complexity O(log quotient). Dave On Aug 18, 10:48 am, aditya kumar aditya.kumar130...@gmail.com wrote: how abt subtracting . like a=a-b till a becomes zero . no of times

[algogeeks] Re: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Dave
@Dheeraj: What about it? It doesn't give the quotient. What is it supposed to do? Dave On Aug 18, 11:06 am, DheerajSharma dheerajsharma1...@gmail.com wrote: wat about shifting 'a' right by floar(log2(b)) and adding 1 to it.. On Aug 18, 8:48 pm, aditya kumar aditya.kumar130...@gmail.com wrote:

[algogeeks] Oracle !!

2011-08-18 Thread jestincobol nair
how to prepare for oracle plz give suggestions .. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] Re: Make My Trip *URGENT*

2011-08-18 Thread Anika Jain
the level is very easy.. i dont remember the questions .. but they are easy.. but tht makes cut off go very high On Thu, Aug 18, 2011 at 1:22 PM, monish001 monish.gup...@gmail.com wrote: What level of questions for each- english, aptitute, coding? Can you discuss some? -Monish On Aug 17,

[algogeeks] Re: MS BRAINTEASR

2011-08-18 Thread chhabraamit
Time taken by one man only . As a person can do only at exactly mid night so , all have to do together only at midnight . On Aug 18, 3:51 pm, pg@manit gpt.pa...@gmail.com wrote: A bunch of men are on an island. A genie comes down and gathers everyone together and places a magical hat on some

[algogeeks] Ebay Recruitment

2011-08-18 Thread ROHIT SINGHAL
Guys i m going to appear for ebay any question set or any kinda help for the same -- Regards: Rohit Singhal -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from

Re: [algogeeks] Adobe off campus event

2011-08-18 Thread siddharam suresh
guys please keep updating about any off campus event Thank you, Siddharam On Thu, Aug 18, 2011 at 10:28 PM, rubal singh singhisru...@gmail.comwrote: Is Adobe open now for offcampus recruitment?? Regards Rubal Singh On Thu, Aug 18, 2011 at 5:11 PM, anon kaustubh.c...@gmail.com wrote: Has

Re: [algogeeks] Ebay Recruitment

2011-08-18 Thread Swathi
Is it ebay or paypal? Job location? On Thu, Aug 18, 2011 at 11:26 PM, ROHIT SINGHAL rohitksingha...@gmail.comwrote: Guys i m going to appear for ebay any question set or any kinda help for the same -- Regards: Rohit Singhal -- You received this message because you are subscribed to the

Re: [algogeeks] Ebay Recruitment

2011-08-18 Thread ROHIT SINGHAL
ebay job location- chennai On Thu, Aug 18, 2011 at 11:28 PM, Swathi chukka.swa...@gmail.com wrote: Is it ebay or paypal? Job location? On Thu, Aug 18, 2011 at 11:26 PM, ROHIT SINGHAL rohitksingha...@gmail.com wrote: Guys i m going to appear for ebay any question set or any kinda help for

Re: [algogeeks] Re: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Arun Vishwanathan
@dave: in your algorithm, I have a doubt in the second loop( for loop ). q=0 initially so the first q1 stays zero and then q|=1 makes q=1 now. 1 then becomes x 2 and then again with the OR 2 becomes 3. 3 becomes 6 and with the OR 6 becomes 7. for example if i need to do 24/3, according to the

Re: [algogeeks] De shaw ques!

2011-08-18 Thread Anika Jain
hey but 935*2+69 = 1939 and when this is divided by 38 remainder iscoming to be 1..i guess so.. is it ryt? On Wed, Aug 17, 2011 at 9:55 PM, aditya kumar aditya.kumar130...@gmail.comwrote: i guess if the option is provided it would have been an appropiate question . On Wed, Aug 17, 2011 at

Re: [algogeeks] reason

2011-08-18 Thread Arun Vishwanathan
@programming love:I can understand what u say but my doubt is that for the first output which is 2, according to your example, p has address 10 which it points to.And as u say int * tends to dereference 2 bytes so that wud be now 10 and 11.finally char * takes only 1 byte so why is value at 11

[algogeeks] Answer this !!

2011-08-18 Thread jestincobol nair
In (typical) object-oriented programming languages which one of the following can be done by a subclass (derived class) of class *C*? 1. Remove methods defined in *C* 2. Define instance variables (data members) not defined in *C* 3. Remove instance variables (data members) defined in *C* 1 --

[algogeeks] Re: Ebay Recruitment

2011-08-18 Thread siva viknesh
first round - mixture of c cpp ques mostly with few aptitude ques... for shortlisted people they asked simple ques like reversing LL , basics from c, cpp, dbms etc and simply people were recruited..selected ppl told interview was very easy... On Aug 18, 11:00 pm, ROHIT SINGHAL

[algogeeks] Re: Answer this !!

2011-08-18 Thread sarath prasath
2.. On Aug 18, 11:31 pm, jestincobol nair jestinco...@gmail.com wrote: In (typical) object-oriented programming languages which one of the following can be done by a subclass (derived class) of class *C*? 1. Remove methods defined in *C* 2. Define instance variables (data members) not

Re: [algogeeks] Re: Answer this !!

2011-08-18 Thread siddharth srivastava
2 On 19 August 2011 00:25, sarath prasath prasathsar...@gmail.com wrote: 2.. On Aug 18, 11:31 pm, jestincobol nair jestinco...@gmail.com wrote: In (typical) object-oriented programming languages which one of the following can be done by a subclass (derived class) of class *C*? 1.

Re: [algogeeks] Re: Answer this !!

2011-08-18 Thread priya ramesh
it can remove methods defined in base class as well?? By overriding a virtual base class func?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group,

Re: [algogeeks] Re: Answer this !!

2011-08-18 Thread siddharth srivastava
On 19 August 2011 00:31, priya ramesh love.for.programm...@gmail.comwrote: it can remove methods defined in base class as well?? By overriding a virtual base class func?? I don't think that overriding is considered as removing the function from base class -- You received this message

[algogeeks] query.. amazon question

2011-08-18 Thread *$*
Sort an array of n positive integers containing n/2 sorted integers in first and second-half? in O(n) time complexity .. and space complexity should be constant -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email

[algogeeks] Amazon question

2011-08-18 Thread *$*
How to find duplicate element (only one element is repeated) from an array of unsorted positive integers.. time complexity .. O(n) space .. o(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] c++ q

2011-08-18 Thread priya ramesh
why isn't the size of empty class not equal to zero?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

[algogeeks] Re: MS BRAINTEASR

2011-08-18 Thread icy`
hmm... interesting logic, but what about, for example, 8 people and 3 hats. Why can't one of the five without hats also be unsure and try to go swimming on one of the nights? I was thinking, if they somehow know how many hats there are (writing numbers in the sand or other cheating methods),

Re: [algogeeks] c++ q

2011-08-18 Thread siddharth srivastava
On 19 August 2011 01:05, priya ramesh love.for.programm...@gmail.comwrote: why isn't the size of empty class not equal to zero?? because its a container for other items, but does occupy space for its own storage. -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Ebay Recruitment

2011-08-18 Thread Rahul Tiwari
@rohit singhal off-campus or on-campus ? if on-campus ---mention ur college plz -- Rahul Tiwari aka DONE B Tech Final Year Information Technology Motilal Nehru National Institute of Technology , Allahabad 9838339030 -- You received this message because you are subscribed to the

Re: [algogeeks] Adobe off campus event

2011-08-18 Thread Rahul Tiwari
MICROSOFT is inviting off-campus recruitments..jst check MS website for more info .. -- Rahul Tiwari aka DONE B Tech Final Year Information Technology Motilal Nehru National Institute of Technology , Allahabad 9838339030 -- You received this message because you are subscribed to the

Re: [algogeeks] Adobe off campus event

2011-08-18 Thread payal gupta
+1 siddharam plzz...inform any off campus...if any1 has any idea.. Regards, PAYAL GUPTA. On Thu, Aug 18, 2011 at 11:27 PM, siddharam suresh siddharam@gmail.comwrote: guys please keep updating about any off campus event Thank you, Siddharam On Thu, Aug 18, 2011 at 10:28 PM, rubal

[algogeeks] Re: Question from Google interview

2011-08-18 Thread icy`
Well no, I would think it would match Balls for him, since it is greedy -- it would try to match as much as possible that works/is in dict. So I have to agree with Aditya here, but I would go from the back/right to the left. So I would first get round, then hopefully are round and finally

[algogeeks] Book

2011-08-18 Thread Sanjay Rajpal
Hi friends, Does any one of u has the book Data Structure Puzzles: Puzzle your mind for Data Structures http://www.amazon.com/Data-Structure-Puzzles-Puzzle-Structures/dp/1460994817/ref=ntt_at_ep_dpt_2by Narasimha Karumanchi ? Plz mail this book to me or post the link as soon as possible.. --

[algogeeks] Re: Amazon question

2011-08-18 Thread icy`
#!/usr/bin/ruby -w #array of unsorted positive integers # find the [only] one that is duplicated arr= [97,2,54,26,67,12,1,19,44,4,29,36,67,14,93,22,39,89] h = Hash.new(0) arr.each {|n| h[n]+=1 (puts n; break) if h[n]==2 } #output #67 I hope this meets the requirements ;P On

[algogeeks] Equivalent malloc statement for calloc

2011-08-18 Thread Beginner
calloc(10*sizeof(int)); -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options,

[algogeeks] Re: calculate a/b without using ‘*’, ‘/’’ and ‘%’

2011-08-18 Thread Dave
@Arun: Oops. It looks like the while loop condition should be b = a instead of b a, and the if condition within the for loop should be a = b instead of a b. I'm glad I equivocated with the phrase would look something like. With a = 24 and b = 3, the while loop shifts b left and increments k

[algogeeks] Re: De shaw ques!

2011-08-18 Thread Dave
@Priya: Since gcd(935,38) = 1, any remainder from 0 to 37 can result. Dave On Aug 17, 7:09 am, priya ramesh love.for.programm...@gmail.com wrote: if a number is divided by 935 remainder is 69. if same no. is divided by 38, what will be the remainder? -- You received this message because you

[algogeeks] Re: Question from Google interview

2011-08-18 Thread Dave
@Icy: We agree that you have to look ahead in order to set the spaces correctly. The only point of difference is whether you choose to become more greedy or less greedy when looking ahead fails. Dave On Aug 18, 2:55 pm, icy` vipe...@gmail.com wrote: Well no, I would think it would match Balls  

Re: [algogeeks] Book

2011-08-18 Thread Swati Sarraf
Hi guys, Does any one of u has the book - Data Structures and Algorithms made Easy - by Narasimha Karumanchi http://www.slideshare.net/nakarumaka/data-structures-and-algorithms-made-easy-cover-page On Thu, Aug 18, 2011 at 4:15 PM, Sanjay Rajpal sanjayrajpal108...@gmail.com wrote: Hi friends,

[algogeeks] Puzzle

2011-08-18 Thread Aditya Virmani
If ü - Married û - Not Married and M-ü N-û N-ü L-û L-û M-ü Who is married? qn was put up in this way, asked in Deloitte 2004. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To

Re: [algogeeks] Re: shortest swapping rows

2011-08-18 Thread Prakash D
hey, thanks.. but if it needs many iteration, then we've to check each time whether the array is sorted.. is there any better way for swapping On Thu, Aug 18, 2011 at 5:02 AM, Brijesh Upadhyay brijeshupadhyay...@gmail.com wrote: IT is the question.. You are given an N x N matrix with 0 and 1

[algogeeks] Maximum profit

2011-08-18 Thread pg@manit
i came across a questioncud anyone suggest how to go with this problem...to me it seems to be based on greedy algo You are now incharge of a private hall. People book your hall for different purposes like marriage, meetings and other ceremonies we will consider all these events just as a

Re: [algogeeks] Puzzle

2011-08-18 Thread payal gupta
was there anything more specified Regards, PAYAL GUPTA On Fri, Aug 19, 2011 at 3:29 AM, Aditya Virmani virmanisadi...@gmail.comwrote: If ü - Married û - Not Married and M-ü N-û N-ü L-û L-û M-ü Who is married? qn was put up in this way, asked in Deloitte 2004. -- You received

  1   2   >