Re: [algogeeks] Amazon online test

2011-05-27 Thread balaji a
I actually attended on-campus through my college... On 26 May 2011 16:24, jagannath prasad das jpdasi...@gmail.com wrote: how to register for amazon ol exm .can you plz mention ? On Sun, Apr 24, 2011 at 6:46 PM, balaji a peshwa.bal...@gmail.com wrote: yeah i did.,...there were two section

Re: [algogeeks] Amazon online test

2011-05-27 Thread Supraja Jayakumar
Hi All Is this online test open to all aspirants ie.., is it a screening or only to filtered candidates ? Can I take it as for practice ? Please tell me more about it. Thanks Supraja J On Fri, May 27, 2011 at 12:27 AM, balaji a peshwa.bal...@gmail.com wrote: I actually attended on-campus

Re: [algogeeks] Re: strings

2011-05-27 Thread Senthil S
@ sunny agrawal : I misinterpreted the question .. but im not clear about how you define interleaving of two strings .. Should the two strings be mixed up at constant intervals or they can be mixed up anywhere .. and should the ordering of the characters in the original strings be preserved while

[algogeeks] for intelligent people

2011-05-27 Thread sunny
hi all of you you all can earn 2000+ money from internet by just spending sometime.i have done this and it's awesome really . .so i am sharing the link .so hurryit takes maximum 2 minuts for registration http://www.earnparttimejobs.com/index.php?id=3407956 --

[algogeeks] Re: suitable data structure

2011-05-27 Thread bittu
@himnashu..Obvious Trie(Data Structure) is best in this case i will suggest you to study Trie deeply try it.. if you need more clarification, let me know Thanks Shashank -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

[algogeeks] Re: Palindrome

2011-05-27 Thread bittu
you its similar kind of problems Already Solve few days back please check Previous threads. Small Modification needed in previous solution .except cost not calculated but all possible palindrome have been generated so hope you can try that that will help .(Although its slightly Different

[algogeeks] spoj TRAFICN- graph shortest path

2011-05-27 Thread keyankarthi
i'm trying to solve this problem.. https://www.spoj.pl/problems/TRAFFICN/ https://www.spoj.pl/problems/TRAFFICN/ here there are m edges.. in addition you are given k bi directional edges out of which u can choose only one bi directional or u choose none of the additional edges... aim is to

Re: [algogeeks] Re: strings

2011-05-27 Thread sunny agrawal
two strings can be mixed up anywhere .. and yes the ordering of the characters in the original strings must be preserved while constructing the third string ?? On Fri, May 27, 2011 at 1:04 PM, Senthil S senthil2...@gmail.com wrote: @ sunny agrawal : I misinterpreted the question .. but im not

[algogeeks] Re: spoj--two squares problem

2011-05-27 Thread bittu
@ashish you forget one condition that c=x^2+y^2 iff c= 1 mod(4) e.g. c %4==1 also x!=y see above link its great simple. Thanks to Fermat Euler Thanks Shashank -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

Re: [algogeeks] Re: sum of two

2011-05-27 Thread sukhmeet singh
@Dave nd @Akash can u explain a bit more.. I didn't get what u say.. Inserting in a map takes O(log n) time !! On Fri, May 20, 2011 at 8:35 PM, Aakash Johari aakashj@gmail.comwrote: @Dave: This is what is still a doubt to me. I have searched but couldn't get the info regarding this. On

Re: [algogeeks] Re: sum of two

2011-05-27 Thread anshu mishra
map is internally implemented with balanced binary tree and inserting in a BST is o(logn); -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send

Re: [algogeeks] Re: sum of two

2011-05-27 Thread Aakash Johari
yes, you are right. map insertion takes O(log n) time. so if you know the upper bound of N, you can simply map the existence/non-existence of any particular element in an array. that will be in constant time (for query purposes) and O(n) time for preprocessing. On Fri, May 27, 2011 at 1:29 AM,

Re: [algogeeks] Re: sum of two

2011-05-27 Thread bhavana
can be solved easily if the elements of the array lie in a limited range which can b known beforehand...!! On Fri, May 27, 2011 at 2:10 PM, Aakash Johari aakashj@gmail.comwrote: yes, you are right. map insertion takes O(log n) time. so if you know the upper bound of N, you can simply map

Re: [algogeeks] [brain teaser ] Akbar Birbal Tale 27 may

2011-05-27 Thread Akshata Sharma
Birbal asks the neighbour to take out his water at once from the well he sold to farmer, or pay rent to farmer for keeping his water in farmer's well. Now neighbour realized that he may run in loss by doing so, so he apologize to farmer. dispute settled. :) On Fri, May 27, 2011 at 12:34 PM,

Re: [algogeeks] Re: sum of two

2011-05-27 Thread sukhmeet singh
@bhavana : Explain..!! as far as i get you is that it would be same as implementing map ...!! isn't ?? On Fri, May 27, 2011 at 2:16 PM, bhavana bhavana@gmail.com wrote: can be solved easily if the elements of the array lie in a limited range which can b known beforehand...!! On Fri,

Re: [algogeeks] Re: sum of two

2011-05-27 Thread bhavana
@sukhi : instead of using a map...use a boolean array elements of whoch r initialised to false. Starting frm the first element of the arrayif the number n is greater than k ignore itelse mark a[n]=true and check if a[k-n]==true then we get the required result .bt if we reach the end

Re: [algogeeks] Re: sum of two

2011-05-27 Thread bhavana
hey...bt this one works only in case given that the elements of the array are non-negative. On Fri, May 27, 2011 at 2:30 PM, bhavana bhavana@gmail.com wrote: @sukhi : instead of using a map...use a boolean array elements of whoch r initialised to false. Starting frm the first element of

[algogeeks] output

2011-05-27 Thread Bhavesh agrawal
#include stdio.h /* copy input to output; 2nd version */ main() { int c; while ((c = getchar()) != EOF printf(%d\n,c)) {putchar(c); printf(\n);} } it's output is like a 97 a 10 b 98 b 10 i dont understand the meaning of 10 here -- You received this message because you are subscribed to the

Re: [algogeeks] Re: sum of two

2011-05-27 Thread sukhmeet singh
k.. got it .. but it was same as putting them into a map ..if the bound 'b' is not known.. as said be Akash .. But if STL is not allowed your approach is mch better..Noogle.. also a simple change that can be done if the each number is that we can check if (sum - a[i] )!= i then getting same can

Re: [algogeeks] output

2011-05-27 Thread • » νιρυℓ « •
Newline Character '\n' = ascii 10 On Fri, May 27, 2011 at 2:36 PM, Bhavesh agrawal agr.bhav...@gmail.comwrote: #include stdio.h /* copy input to output; 2nd version */ main() { int c; while ((c = getchar()) != EOF printf(%d\n,c)) {putchar(c); printf(\n);} } it's output is like a

Re: [algogeeks] Re: sum of two

2011-05-27 Thread bhavana
hehe...d difference is regarding time complexity...bcoz map takes 0(logN) for insertion while array can b accessed in constant time through index. On Fri, May 27, 2011 at 2:39 PM, sukhmeet singh sukhmeet2...@gmail.comwrote: k.. got it .. but it was same as putting them into a map ..if the bound

Re: [algogeeks] Re: sum of two

2011-05-27 Thread Aakash Johari
@sukhmeet: could you get my approach? it was same as Bhavana explained. On Fri, May 27, 2011 at 2:12 AM, bhavana bhavana@gmail.com wrote: hehe...d difference is regarding time complexity...bcoz map takes 0(logN) for insertion while array can b accessed in constant time through index. On

Re: [algogeeks] Re: sum of two

2011-05-27 Thread sukhmeet singh
actly i did.. but bhavana didn;t used STL ..!! My question to you was regarding Dave 's query which i didn't understand what he meant by saying : @Aakash: And tell me how map works. Is making an entry O(1) regardless of the value of the entry? For example, is it O(n) to map the sequence 1, 4, 9,

Re: [algogeeks] Re: sum of two

2011-05-27 Thread Aakash Johari
In the second approach I wrote to use array for mapping you can simply map the existence/non-existence of any particular element in an array. that will be in constant time (for query purposes) and O(n) time for preprocessing. On Fri, May 27, 2011 at 2:18 AM, sukhmeet singh

Re: [algogeeks] Re: suitable data structure

2011-05-27 Thread himanshu kansal
thnks shashankbt i hv used trie for building the dictionary..bt since d wrong words does nt hv a common prefix...so it is nt suitable for storing wrong words(worst case scenario is common)... so i need a ds tht wd make d search of wrong words faster.nd v dont hv to scan d entire

Re: [algogeeks] Re: suitable data structure

2011-05-27 Thread bhavana
@himanshu : den do map the wrong words as u go on finding them in the doc. On Fri, May 27, 2011 at 2:51 PM, himanshu kansal himanshukansal...@gmail.com wrote: thnks shashankbt i hv used trie for building the dictionary..bt since d wrong words does nt hv a common prefix...so it is nt

Re: [algogeeks] Puzzle

2011-05-27 Thread anil chopra
11 On Fri, May 13, 2011 at 12:14 AM, amit amitjaspal...@gmail.com wrote: Consider a series in which 8 teams are participating. each team plays twice with all other teams. 4 of them will go to the semi final.How many matches should a team win, so that it will ensure that it will go to semi

Re: [algogeeks] Re: suitable data structure

2011-05-27 Thread bhavana
sorry guys fr my last post...bcoz dis doesnt provide any benefit..in terms of either space or time . On Fri, May 27, 2011 at 2:55 PM, bhavana bhavana@gmail.com wrote: @himanshu : den do map the wrong words as u go on finding them in the doc. On Fri, May 27, 2011 at 2:51 PM, himanshu

Re: [algogeeks] Puzzle

2011-05-27 Thread Arpit Mittal
8? On Fri, May 27, 2011 at 2:26 AM, anil chopra anil.chopra2...@gmail.comwrote: 11 On Fri, May 13, 2011 at 12:14 AM, amit amitjaspal...@gmail.com wrote: Consider a series in which 8 teams are participating. each team plays twice with all other teams. 4 of them will go to the semi final.How

Re: [algogeeks] Re: suitable data structure

2011-05-27 Thread Aakash Johari
In case of trie tree, you need not to traverse through the whole tree. Just look at how trie tree works, you will come to know. On Fri, May 27, 2011 at 2:27 AM, bhavana bhavana@gmail.com wrote: sorry guys fr my last post...bcoz dis doesnt provide any benefit..in terms of either space or

Re: [algogeeks] Re: spoj--two squares problem

2011-05-27 Thread Balaji S
what if c=9.. 9%4=1 ryt? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options,

Re: [algogeeks] Re: strings

2011-05-27 Thread Aakash Johari
Can be solved in this way also : #include iostream #include cstring using namespace std; string a, b, c; int memo[51][51][51]; int interleave(int ai, int bi, int ci) { int r1, r2; r1 = r2 = 0; if ( ai == a.size() bi == b.size() ci == c.size() ) { return 1;

Re: [algogeeks] one constructor problem

2011-05-27 Thread D.N.Vishwakarma@IITR
without default constructor what will be solution On Wed, May 25, 2011 at 10:56 AM, Aakash Johari aakashj@gmail.comwrote: This way you can do: #include iostream using namespace std; class A { public: int a; A(int m) {

Re: [algogeeks] one constructor problem

2011-05-27 Thread Aakash Johari
Provide some default value to the parameterized constructor. * A(int m = 0) { a = m; } * On Fri, May 27, 2011 at 4:36 AM, D.N.Vishwakarma@IITR deok...@gmail.comwrote: without default constructor what will be solution On Wed, May 25, 2011 at 10:56 AM, Aakash Johari

Re: [algogeeks] Puzzle

2011-05-27 Thread Arpit Mittal
could you please explain how? On Fri, May 27, 2011 at 3:45 AM, varun pahwa varunpahwa2...@gmail.comwrote: i think 11. On Fri, May 27, 2011 at 3:06 PM, Arpit Mittal mrmittalro...@gmail.comwrote: 8? On Fri, May 27, 2011 at 2:26 AM, anil chopra anil.chopra2...@gmail.comwrote: 11 On

Re: [algogeeks] Puzzle

2011-05-27 Thread Rishabh Maurya
suppose bottom 4 teams have won least matches and upper 4 teams have won equal number of matches ... 1 - x 2 - x 3 - x 4 - x 5 - 6 6 - 4 7 - 2 8 - 0 total matches are 56 and let upper four teams have won x matches each so x = (56-(6+4+2+0))/4 x = 11 so in this way to ensure qualification

Re: [algogeeks] Puzzle

2011-05-27 Thread Aakash Johari
Is it the minimum required matches to ensure for semifinals? On Fri, May 27, 2011 at 6:06 AM, Rishabh Maurya poofiefoo...@gmail.comwrote: suppose bottom 4 teams have won least matches and upper 4 teams have won equal number of matches ... 1 - x 2 - x 3 - x 4 - x 5 - 6 6 - 4 7 - 2 8

[algogeeks] Google Interview Question

2011-05-27 Thread ross
Hi all, Given an array of elements find the largest possible number that can be formed by using the elements of the array. eg: 10 9 ans: 910 2 3 5 78 ans: 78532 100 9 ans: 9100 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to

Re: [algogeeks] Google Interview Question

2011-05-27 Thread radha krishnan
sort :) On Fri, May 27, 2011 at 6:57 PM, ross jagadish1...@gmail.com wrote: Hi all, Given an array of elements find the largest possible number that can be formed by using the elements of the array. eg: 10 9 ans: 910 2 3 5 78 ans: 78532 100 9 ans: 9100 -- You received this

Re: [algogeeks] Google Interview Question

2011-05-27 Thread adityasirohi
are you kidding me. Just simple sort wont work. On Fri, May 27, 2011 at 9:31 AM, radha krishnan radhakrishnance...@gmail.com wrote: sort :) On Fri, May 27, 2011 at 6:57 PM, ross jagadish1...@gmail.com wrote: Hi all, Given an array of elements find the largest possible number that can

Re: [algogeeks] Google Interview Question

2011-05-27 Thread Piyush Sinha
we can work out if we sort according to the leftmost integer On 5/27/11, adityasir...@gmail.com adityasir...@gmail.com wrote: are you kidding me. Just simple sort wont work. On Fri, May 27, 2011 at 9:31 AM, radha krishnan radhakrishnance...@gmail.com wrote: sort :) On Fri, May 27, 2011

Re: [algogeeks] Google Interview Question

2011-05-27 Thread radha krishnan
Haha !! Any counter case against sort ? ?? ? :P On Fri, May 27, 2011 at 7:02 PM, adityasir...@gmail.com wrote: are you kidding me. Just simple sort wont work. On Fri, May 27, 2011 at 9:31 AM, radha krishnan radhakrishnance...@gmail.com wrote: sort :) On Fri, May 27, 2011 at 6:57 PM,

[algogeeks] Re: Puzzle

2011-05-27 Thread vishwakarma
Correct me if i m wrong !!! Number of matches of each team = 14. Let team A,B,C,D qualify for semifinal. 1.maximum number of matches A can win = 14 (all played ) 2.maximum number of matches B can win = 12 (all played except played with team A) 3.maximum number of matches C can win = 10 (all

Re: [algogeeks] Google Interview Question

2011-05-27 Thread wujin chen
@Piyush, how to deal with this case :100 , 10 2011/5/27 Piyush Sinha ecstasy.piy...@gmail.com we can work out if we sort according to the leftmost integer On 5/27/11, adityasir...@gmail.com adityasir...@gmail.com wrote: are you kidding me. Just simple sort wont work. On Fri, May 27,

Re: [algogeeks] Google Interview Question

2011-05-27 Thread adityasirohi
how about this case: 9, 100 - 9100 100 9 9100 2, 3, 9, 78 -- 78 9 3 2 9 78 3 2 I guess solution should be:- sort the array of numbers in an ascending order and then check for the first element in the array, if there is any other element greater than it, shift all the elements one right and

Re: [algogeeks] Re: Puzzle

2011-05-27 Thread Rishabh Maurya
No , you are wrong .. problem statement says how many matches should a teams win to ensure its qualification , their no word like minimum or maximum ... 8 gets wrong if following situation arises 1 - 9 2 - 9 3 - 9 4 - 9 5 - 8 6 - 6 7 - 4 8 - 2 -- You received this message because you are

Re: [algogeeks] Google Interview Question

2011-05-27 Thread Piyush Sinha
how about adding zeroes at the end of integers to make to equal to the integer with maximum number of digits and sort them... ex- 101 10 adding zeroes.. 101 100 sort 100 101 therefore make number as 10110 100 1 adding zeroes 100 100 therefore number is 1100 I am not sure of the

Re: [algogeeks] Re: Puzzle

2011-05-27 Thread Arpit Mittal
@rishabh : in your solution u have taken scores of last 4 teams as 6 4 2 0. what if i take 2 2 2 2 then the ans would be 56-(2+2+2+2)/4 = 12...!!! and i can also take the scores of last 4 teams as 6 4 4 2 then the ans would be 56-(6+4+4+2)/4 = 10!!! so how you can say it would be 11? On Fri,

Re: [algogeeks] Google Interview Question

2011-05-27 Thread Logic King
i agree with piyush...can't find the countercase...satisfied with the algo. On Fri, May 27, 2011 at 6:58 AM, Piyush Sinha ecstasy.piy...@gmail.comwrote: how about adding zeroes at the end of integers to make to equal to the integer with maximum number of digits and sort them... ex- 101 10

[algogeeks] Re: Puzzle

2011-05-27 Thread vishwakarma
@Arpit Any four team cannot win 12 matches in total. ...Rishabh is wid right answer that is ( 11 ). Hence any team winning its any 11 out of 14 matches ensures its entry to semis. But not below 11 its entry to semi will depend on other team performance. On May 27, 7:11 pm, Arpit Mittal

Re: [algogeeks] Re: Puzzle

2011-05-27 Thread Arpit Mittal
@rishabh : now i understand it better... thanks :) On Fri, May 27, 2011 at 7:22 AM, Rishabh Maurya poofiefoo...@gmail.comwrote: because we want upper 4 teams to win maximum matches altogether so to satisfy this criteria .. last team should win 0 , and team 7 must have lost all its

Re: [algogeeks] Re: Puzzle

2011-05-27 Thread Arpit Mittal
@Vishwakarma it is now ok that 11 should be the answer, but why any 4 teams cannot win 12 matches in total... for that they have to score 12*4 = 48 points out of 56. then wats the problem. i know how it is coming 11 now, but i am replying back for the doubt i have in a line u just mentioned in

Re: [algogeeks] Google Interview Question

2011-05-27 Thread • » νιρυℓ « •
Take input as vector of string or array of string sort the vector print from end to beginning On Fri, May 27, 2011 at 7:51 PM, Logic King crazy.logic.k...@gmail.comwrote: i agree with piyush...can't find the countercase...satisfied with the algo. On Fri, May 27, 2011 at 6:58 AM, Piyush Sinha

[algogeeks] Immediate requirements for Peoplesoft Developer // wilmington,DE

2011-05-27 Thread Prakash recruiter
Dear Folks, Wishes for the Day, We need consultant for *PeopleSoft Developer* please share suitable profiles to prak...@panzersolutions.com *Job title: PeopleSoft Developer* *Location : Wilmington, DE * *Duration : 6 Months* *Rate: Market * Job Responsibilities: Participate in

Re: [algogeeks] Google Interview Question

2011-05-27 Thread • » νιρυℓ « •
@Piyush Sinha, what about 9, 801 2011/5/27 • » νιρυℓ « • vipulmehta.1...@gmail.com Take input as vector of string or array of string sort the vector print from end to beginning On Fri, May 27, 2011 at 7:51 PM, Logic King crazy.logic.k...@gmail.comwrote: i agree with piyush...can't find

Re: [algogeeks] Google Interview Question

2011-05-27 Thread Aakash Johari
@vipul: try for 100 and 10 2011/5/27 • » νιρυℓ « • vipulmehta.1...@gmail.com @Piyush Sinha, what about 9, 801 2011/5/27 • » νιρυℓ « • vipulmehta.1...@gmail.com Take input as vector of string or array of string sort the vector print from end to beginning On Fri, May 27, 2011 at 7:51

Re: [algogeeks] Google Interview Question

2011-05-27 Thread Arpit Mittal
@piyush : for 1, 100 you did 100,100 then sort result 100,100 so u said ans is 1100 but it could also be 1001 as 100=100... correct me if i am wrong? On Fri, May 27, 2011 at 7:39 AM, Aakash Johari aakashj@gmail.comwrote: @vipul: try for 100 and 10 2011/5/27 • » νιρυℓ « •

Re: [algogeeks] Google Interview Question

2011-05-27 Thread • » νιρυℓ « •
@Aakash, yeah missed that, overriding default string comparator while sorting will do that. On Fri, May 27, 2011 at 8:11 PM, Arpit Mittal mrmittalro...@gmail.comwrote: @piyush : for 1, 100 you did 100,100 then sort result 100,100 so u said ans is 1100 but it could also be 1001 as

[algogeeks] Re: Puzzle

2011-05-27 Thread vishwakarma
so here we go Let A loses two of its matches to (one to B and one to C). Let B loses two of its matches to(one to A and one to C) Then C loses two of its matches to(one to A and one to C). Now. team D, if it ever plays with (A,B,C) will loses..hence minimum number o matches it is going

[algogeeks] Re: Puzzle

2011-05-27 Thread vishwakarma
correction---it was typo mistake ... Team C loses to(one to A and one to B) On May 27, 7:44 pm, vishwakarma vishwakarma.ii...@gmail.com wrote: so here we go Let A loses two of its matches to (one to B and one to C). Let B loses two of its matches to(one to A and one to C) Then C loses

[algogeeks] Re: Puzzle

2011-05-27 Thread vishwakarma
correction--Then C loses two of its matches to(one to A and one to C). to Then C loses two of its matches to(one to A and one to B) . On May 27, 7:44 pm, vishwakarma vishwakarma.ii...@gmail.com wrote: so here we go Let A loses two of its matches to (one to B and one to C). Let B loses

Re: [algogeeks] Re: Puzzle

2011-05-27 Thread Arpit Mittal
@vishwakarma thanks for rectifying me... its clear... 12 is not posible, i was in another way :) On Fri, May 27, 2011 at 7:46 AM, vishwakarma vishwakarma.ii...@gmail.comwrote: correction---it was typo mistake ... Team C loses to(one to A and one to B) On May 27, 7:44 pm, vishwakarma

[algogeeks] Senior Network Admin // Boston, MA // 6+ Months contract

2011-05-27 Thread sohail panzer
Hello, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. Title : Senior Network

[algogeeks] Sure Shot Closure for Perl Programmer in Ft. Lauderdale, FL

2011-05-27 Thread sohail panzer
Hello, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. * Please reply at soh...@panzersolutions.com * Title

Re: [algogeeks] Google Interview Question

2011-05-27 Thread anshu mishra
@all go through this code #includeiostream #includealgorithm using namespace std; bool compare(int a, int b) { string u, v; u = v = ; while (a) { u += (a % 10 + '0'); a/=10; } while (b) { v +=

[algogeeks] Immediate Need for Sharepoint/.NET Developer in Denver CO

2011-05-27 Thread sohail panzer
Hello, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. Please reply at soh...@panzersolutions.com Title

[algogeeks] island puzzle

2011-05-27 Thread himanshu kansal
a king has two sons eric and bob.he wants to divide his islands the islands are in a queue.eric being elder gets the first chancethey both can pick d island alternatively from beginning or end of the queue only.design an algo so tht eric gets the max. piece of land. i hv

[algogeeks] Weblogic Portal Developer -- BASKING RIDGE, NJ -- 2 months contract

2011-05-27 Thread sohail panzer
Hello, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. *Please reply at soh...@panzersolutions.com * Title

Re: [algogeeks] Google Interview Question

2011-05-27 Thread Supraja Jayakumar
Hi Isnt this the Kadane's (largest subarray) problem ? Rgds Supraja J On Fri, May 27, 2011 at 9:41 AM, anshu mishra anshumishra6...@gmail.comwrote: @all go through this code #includeiostream #includealgorithm using namespace std; bool compare(int a, int b) { string u, v;

Re: [algogeeks] Google Interview Question

2011-05-27 Thread • » νιρυℓ « •
Kadane's algorithm is considers subarray sum, we are considering concatenation here. On Fri, May 27, 2011 at 9:45 PM, Supraja Jayakumar suprajasank...@gmail.com wrote: Hi Isnt this the Kadane's (largest subarray) problem ? Rgds Supraja J On Fri, May 27, 2011 at 9:41 AM, anshu mishra

[algogeeks] 100% close for UI Developer in Chicago, IL

2011-05-27 Thread sohail panzer
Hello, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. *Please reply at soh...@panzersolutions.com* * *

[algogeeks] Re: Google Interview Question

2011-05-27 Thread xeron!x
No, Kadane's algorithm considers subarray sum, we are considering concatenation ( for whole array ). The solution with custom string comparator : http://ideone.com/doASH. On May 27, 9:15 pm, Supraja Jayakumar suprajasank...@gmail.com wrote: Hi Isnt this the Kadane's (largest subarray) problem

[algogeeks] Lotus Connections Developer // Wilmington, DE // 6 Months contract

2011-05-27 Thread sohail panzer
Hello, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. *Please reply at soh...@panzersolutions.com ** *

[algogeeks] ms ques

2011-05-27 Thread UTKARSH SRIVASTAV
test cases for internet explorer -- *UTKARSH SRIVASTAV CSE-3 B-Tech 2nd Year @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,

[algogeeks] ATG Developer // Vernon Hills, IL // 12 Months contract

2011-05-27 Thread sohail panzer
Hello, Hope you are doing well. I am a technical recruiter with Panzer Solutions LLC Software Implementing and IT consulting company located in CT. Please go through the Job Description and send me your updated resume with contact information. *Please reply at soh...@panzersolutions.com * Title

[algogeeks] Re: Puzzle

2011-05-27 Thread L
Ah! sorry. This combination is not possible. It will be 10,10,10,10,10,4,2,0. So, the answer is 11. On May 27, 10:10 pm, L prnk.bhatna...@gmail.com wrote: The worst case will occur when 5 teams have the same number of wins. As only 4 can qualify, one team with the same number of points will

Re: [algogeeks] Google Interview Question

2011-05-27 Thread ankit sambyal
@Piyush: try 97,8,9 acc. to ur algo, adding 0s: 97,80,90 then sorting : 97,90,80 so final ans acc. to ur algo: 9798 whereas the correct ans is : 9897 Ankit BITS Pilani On Fri, May 27, 2011 at 6:58 AM, Piyush Sinha ecstasy.piy...@gmail.comwrote: how about adding zeroes at the end of

Re: [algogeeks] Google Interview Question

2011-05-27 Thread shubham
check whether these steps work: step 1: sort the given numbers in the decreasing order based on their first digit. step 2: if two numbers come out to be equal in the above case both of their next digit exist then sort on the basis of their next digit, otherwise the number

Re: [algogeeks] Google Interview Question

2011-05-27 Thread • » νιρυℓ « •
@shubham, 10 101 ?? On Fri, May 27, 2011 at 11:41 PM, shubham shubh2...@gmail.com wrote: check whether these steps work: step 1: sort the given numbers in the decreasing order based on their first digit. step 2: if two numbers come out to be equal in the above case both

Re: [algogeeks] Google Interview Question

2011-05-27 Thread ankit sambyal
@shubam: won't work try following test case: 8,89,9 Ankit Sambyal On Fri, May 27, 2011 at 11:11 AM, shubham shubh2...@gmail.com wrote: check whether these steps work: step 1: sort the given numbers in the decreasing order based on their first digit. step 2: if two

[algogeeks] Odd Even Sort array

2011-05-27 Thread ross
Hi all, Sort all elements in odd indices of an array in ascending order and even indices in descending order. Finally, rearrange so that all even indexed elements come first. eg: input – 7 2 6 4 8 3 1 even indexed : 7 6 8 1 = sort 8 7 6 1 odd indexed: 2 4 3 = sort 2 3 4 output – 8 7 6 1 2 3 4

[algogeeks] Re: Puzzle

2011-05-27 Thread Don
To solve this, look at an 8x8 grid representing the games played. The diagonal is not used, because teams do not play themselves. Below the diagonal is the first game between each team and above the diagonal is the second game. Assume that teams 1-4 are the ones who will go to the semi-finals.

Re: [algogeeks] Google Interview Question

2011-05-27 Thread srajan dongre
@ankit sambyal.i think d rite answer will be 9978 in dat case. On Fri, May 27, 2011 at 11:50 PM, ankit sambyal ankitsamb...@gmail.comwrote: @shubam: won't work try following test case: 8,89,9 Ankit Sambyal On Fri, May 27, 2011 at 11:11 AM, shubham shubh2...@gmail.com wrote:

Re: [algogeeks] posix threads

2011-05-27 Thread Douglas Diniz
Whats the point? There is infinite points to use threads, even in a single core. On Fri, May 27, 2011 at 4:05 PM, jagannath jpdasi...@gmail.com wrote: hi guys,       i know that pthread is an user-level thread and an user-level can't take the advantage of SMP. Then what is the point of

Re: [algogeeks] Google Interview Question

2011-05-27 Thread ankit sambyal
@srajan: ya , i made a mistake...the correct ans will of-course be 9978 On Fri, May 27, 2011 at 12:11 PM, srajan dongre srajan.don...@gmail.comwrote: @ankit sambyal.i think d rite answer will be 9978 in dat case. On Fri, May 27, 2011 at 11:50 PM, ankit sambyal

Re: [algogeeks] Odd Even Sort array

2011-05-27 Thread Piyush Sinha
will it be given that the number of elements is always even?? On 5/28/11, ross jagadish1...@gmail.com wrote: Hi all, Sort all elements in odd indices of an array in ascending order and even indices in descending order. Finally, rearrange so that all even indexed elements come first. eg:

Re: [algogeeks] Odd Even Sort array

2011-05-27 Thread srajan dongre
wat about insertion sort (with some limited conditions obviously ) ?? On Sat, May 28, 2011 at 12:56 AM, Piyush Sinha ecstasy.piy...@gmail.comwrote: will it be given that the number of elements is always even?? On 5/28/11, ross jagadish1...@gmail.com wrote: Hi all, Sort all elements in

Re: [algogeeks] Odd Even Sort array

2011-05-27 Thread LALIT SHARMA
It will give correct answer , but instead of doing manipulation after taking input. as it would take some O(n) time. if n would be large , we would incur this extra cost . we should change the termination condition of merge-sort function and modify the merge function of merge sort ..to reach our

[algogeeks] Re: Google Interview Question

2011-05-27 Thread Dave
@Shubham: Try 8, 89, 7. Your algorithm gives 8897, but the right answer is 8987. Dave On May 27, 1:11 pm, shubham shubh2...@gmail.com wrote: check whether these steps work: step 1:         sort the given numbers in the decreasing order based on their first digit. step 2:         if two

Re: [algogeeks] Re: Google Interview Question

2011-05-27 Thread Logic King
@sunny it will work fine if you have 2 numbers only...but what about the list...3..4 or 5..or morethen the possible number of combinations will be 'N!'...where n is the number of digits...the code will work quite slowly for larger 'n'. On Fri, May 27, 2011 at 3:33 PM, Dave

Re: [algogeeks] Odd Even Sort array

2011-05-27 Thread subramania jeeva
I hope merge sort is not an inplace sorting.. It'll take extra space (in function merge) and since it uses recursion it'll also take stack space.. I think this sol will work. 1. partition the array by holding the even elements on first space(n/2 or n/2-1 depends on odd sized and even sized

Re: [algogeeks] ms ques

2011-05-27 Thread Logic King
http://samples.msdn.microsoft.com/ietestcenter/ On Fri, May 27, 2011 at 9:40 AM, radha krishnan radhakrishnance...@gmail.com wrote: Check whether this is storing Google Search Results ? ? ?? ? ? ? ? ?? [HONEY POTTING] On Fri, May 27, 2011 at 10:07 PM, UTKARSH SRIVASTAV

Re: [algogeeks] Odd Even Sort array

2011-05-27 Thread saurabh singh
Yup...I think thats the way to go...modify heap sort...'ignoring the odd childs' for ascending and ignoring the even child for decending. If i am wrong in this then quick sort has to be the solution. On Sat, May 28, 2011 at 8:44 AM, subramania jeeva subramaniaje...@gmail.com wrote: I hope merge

Re: [algogeeks] Re: sum of two

2011-05-27 Thread sukhmeet singh
ya .. it can work for negative indexes also if the bound is known.. like if the range is from -10 to +10 then declare an array of 20 and then refer a[10] as a[0] and use negative indexes to do the same procedure !! On Fri, May 27, 2011 at 2:32 PM, bhavana bhavana@gmail.com wrote: hey...bt

Re: [algogeeks] Odd Even Sort array

2011-05-27 Thread Logic King
@ross i can do it in O(n) time using an extra array of the same size as the given array first sort both the even indexed terms and odd indexed terms by modifying quick sort...it can be done in one traversal. and then using extra array and then move the even indexed terms followed by odd

[algogeeks] Re: sum of two

2011-05-27 Thread Dave
If map insertion is O(log n), then the algorithms that insert each element into the map will be O(n log n), but the problem statement insists that we find two elements of the array that sum to a given number in O(n) time. Thus, Aakash's solution (http://groups.google.com/

Re: [algogeeks] Re: sum of two

2011-05-27 Thread Aakash Johari
@Dave: I have suggested another solution in previous threads. Please go through that. That is without maps. It uses array for mapping. On Fri, May 27, 2011 at 10:09 PM, Dave dave_and_da...@juno.com wrote: If map insertion is O(log n), then the algorithms that insert each element into the map