Re: [algogeeks] Flip kart

2011-09-22 Thread rahul sharma
wats eligibility n package? On Thu, Sep 22, 2011 at 12:26 AM, sagar pareek sagarpar...@gmail.comwrote: nit allahabad On Thu, Sep 22, 2011 at 12:20 AM, arpit rajpurohit arpit.rajpuro...@gmail.com wrote: which college may i know? On Wed, Sep 21, 2011 at 11:29 PM, sagar pareek

[algogeeks] help nedded

2011-09-22 Thread rahul sharma
i found a question of ms earlier but know i not able to find it.plz post link or thread i/p::a3b2c4: o/p:aaabb i/p:aaabbc o/p:a3b2c1 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Re: question

2011-09-22 Thread Ramakant Sharma
starting from right find first digit less then right most digit,if no any digit is less,then move to next right most and compair when found exchange those no, now sort the no.s up to that index of the given no which is exchanged: Ex: 43987723893239876 first required sequence:

Re: [algogeeks] THANX ALGOGEEKS !!!!!!

2011-09-22 Thread rahul sharma
plz post the written test n interview question...thnx in advance On Thu, Sep 22, 2011 at 8:59 AM, saurabh sah.saurab...@gmail.com wrote: I sincerely thank this group as i got selected in Microsoft IDC only because of this group . It was a wonderful experience for me at the interviews

[algogeeks] Re: THANX ALGOGEEKS !!!!!!

2011-09-22 Thread siva viknesh
congrats :) and share ur experiences On Sep 22, 11:28 am, rahul sharma rahul23111...@gmail.com wrote: plz post the written test n interview question...thnx in advance On Thu, Sep 22, 2011 at 8:59 AM, saurabh sah.saurab...@gmail.com wrote: I sincerely thank this group as i got selected

Re: [algogeeks] Re: question

2011-09-22 Thread Ratan
@kartik : to some extent ur code is giving the right answer... btw somehow check tis let for example the no be 759854 then the next biggest no is 794558 btw ur program is giving 795854 which is undoubtedly wrong the code would give more appropriate result if u sort the numbers from

Re: [algogeeks] MICROSOFT IDC

2011-09-22 Thread Suraj Fale
Congrats !!!1 -- Regards Suraj Fale +91-9766103115 -- You received this message because you are subscribed to the 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] THANX ALGOGEEKS !!!!!!

2011-09-22 Thread kumar raja
Congrats dude... On 22 September 2011 07:29, saurabh sah.saurab...@gmail.com wrote: I sincerely thank this group as i got selected in Microsoft IDC only because of this group . It was a wonderful experience for me at the interviews because the some of questions were closely related to the

Re: [algogeeks] MICROSOFT IDC

2011-09-22 Thread teja bala
congrats dude On Thu, Sep 22, 2011 at 12:46 PM, Suraj Fale surajfa...@gmail.com wrote: Congrats !!!1 -- Regards Suraj Fale +91-9766103115 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Re: question

2011-09-22 Thread Dheeraj Sharma
@Ratan: i think the next largest here would be 784559 On Thu, Sep 22, 2011 at 12:39 PM, Ratan success.rata...@gmail.com wrote: @kartik : to some extent ur code is giving the right answer... btw somehow check tis let for example the no be 759854 then the next biggest no is 794558 btw ur

[algogeeks] Re: informatica pattern and question of interview

2011-09-22 Thread siva viknesh
for interview ques 1 .. fink ak 's position using normal binary search in original list ..log n postion of a1 in corrupted list is n-k+1 .. O(1) eg : original : 0 1 2 3 4 corrupted : 3 4 0 1 2 n=5, k=3 , hence the ans 2...correct me if m wrong @ anup .. can u explain solution through

Re: [algogeeks] easy c output....

2011-09-22 Thread Anil Arya
thanx Balaji:) On Thu, Sep 22, 2011 at 6:07 AM, Balaji balaji.subraman...@gmail.comwrote: Hi Anil, #a is a preprocessor operator to convert the argument specified as string or enclosing in double quotes. so, after macro expansion, the printf statement would become printf(%d\n,*432); =

Re: [algogeeks] Re: question

2011-09-22 Thread Ratan
@dheeraj ... ya u r ryt thnxs for the correction On Thu, Sep 22, 2011 at 1:30 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: @Ratan: i think the next largest here would be 784559 On Thu, Sep 22, 2011 at 12:39 PM, Ratan success.rata...@gmail.com wrote: @kartik : to some extent ur

Re: [algogeeks] Re: question

2011-09-22 Thread Dheeraj Sharma
#includeiostream #includeconio.h #includestring.h #define swap(a,b,c) (c)=(a),(a)=(b),(b)=(c) using namespace std; int main() { char str[100],t; cinstr; int len=strlen(str); int i,x,boo=1; for(i=len-1;i0boo;i--) { for(x=i-1;x=0boo;x--) {

Re: [algogeeks] help nedded

2011-09-22 Thread Dheeraj Sharma
for 2nd one #includeiostream #includeconio.h using namespace std; int main() { char str[100]; cinstr; char ch=str[0]; int count=0,i=0; while(str[i]) { if(str[i]==ch) count++; else {

Re: [algogeeks] help nedded

2011-09-22 Thread Dheeraj Sharma
for 1st #includeiostream #includeconio.h #includestring.h using namespace std; int main() { char str[100]; cinstr; int len=strlen(str); int i=1; while(ilen) { int x=str[i]-48; while(x--) coutstr[i-1]; i+=2;

Re: [algogeeks] Re: question

2011-09-22 Thread kartik sachan
@ratan suggest some efficient algo... -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com.

Re: [algogeeks] Re: question

2011-09-22 Thread Dheeraj Sharma
in nlog(n) #includeiostream #includeconio.h #includestring.h #define swap(a,b,c) (c)=(a),(a)=(b),(b)=(c) using namespace std; int t; void quicksort(char arr[],int left,int right) { if(leftright) { int piv=right; int i=left,j=left;

Re: [algogeeks] Re: question

2011-09-22 Thread algo geek
Keep a pointer ont the rightmost digit. Keep moving right until you find the number in increasing number. As soon as this breaks. stop. Swap the digit at the current position with the smallest digit, but larger than the current position digit, sort the array to the right of the current position in

Re: [algogeeks] Re: question

2011-09-22 Thread bharatkumar bagana
@deeraj : for i/p 7585 u'r code is giving 7855 .. On Thu, Sep 22, 2011 at 6:54 AM, algo geek geeka...@gmail.com wrote: Keep a pointer ont the rightmost digit. Keep moving right until you find the number in increasing number. As soon as this breaks. stop. Swap the digit at the current position

Re: [algogeeks] Re: question

2011-09-22 Thread Yogesh Yadav
@algo geek: there is some error in your logic... consider a number 759845 according to ur logic the number greater than this will be 784559 but it should be 759854 . On Thu, Sep 22, 2011 at 4:24 PM, algo geek geeka...@gmail.com wrote: Keep a pointer ont the rightmost digit. Keep

Re: [algogeeks] Re: question

2011-09-22 Thread Ratan
the following pseudocode may work: for(i=l;i=0;i--) { if(a[i-1]a[i]) { swap(a[i-1],a[i]); sort(a,i,l); swap(a[i-1],a[l]); break; } } here sort is a function that sort the array from index i to l. On Thu, Sep 22, 2011 at 4:38 PM, bharatkumar bagana

Re: [algogeeks] Re: Microsoft Question

2011-09-22 Thread Dheeraj Sharma
@kartik: i thnk u r searching for string...that may have characters..in the 2d matrix ..NO MATTER WHERE THEY ARE.. On Wed, Sep 21, 2011 at 7:10 PM, kartik sachan kartik.sac...@gmail.comwrote: i think i can solve this in O(n^2) here is code http://ideone.com/Gk69A # includestdio.h#

Re: [algogeeks] Re: question

2011-09-22 Thread Yogesh Yadav
my logic: if wrong then plz tell... start from rightmost digit and search towards left a digit less than this... if found ... just swap...u got the answer... if no small digit found then select second rightmost digit and follow the same process...and so on... for ex: 759354 rightmost

Re: [algogeeks] Re: tree to list

2011-09-22 Thread Yogesh Yadav
inorder traversal will do the job... just make sure to create links... On Thu, Sep 22, 2011 at 1:48 AM, Gene gene.ress...@gmail.com wrote: #include stdio.h typedef struct node_s { int data; struct node_s *left, *right; } NODE; // Convert BST to a sorted list connected by -right

Re: [algogeeks] Re: question

2011-09-22 Thread Ratan
the answer should be 759435... On Thu, Sep 22, 2011 at 4:45 PM, Yogesh Yadav medu...@gmail.com wrote: my logic: if wrong then plz tell... start from rightmost digit and search towards left a digit less than this... if found ... just swap...u got the answer... if no small digit found then

Re: [algogeeks] Re: question

2011-09-22 Thread Yogesh Yadav
@ratan: thanks for correction little correction in my logic... start from rightmost digit and search towards left a digit less than this... if found ... just swap...now after swapping save the index with which you are swapping ...and after that sort the array in ascending order...u got the

[algogeeks] Re: Function pointer

2011-09-22 Thread Mayuresh Gandhewar
It can be used for Call back Functions --Mayuresh S. Gandhewar On Sep 22, 9:29 am, anshu mishra anshumishra6...@gmail.com wrote: as function object also -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks]

2011-09-22 Thread Rohit Upadhyaya
int main() { int a=256; char *p=a; *++p=2; printf(%d,a); return(0); } -- You received this message because you are subscribed to the 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: question

2011-09-22 Thread Arpit Sood
@yogesh nice algo... it is not even required to sort the left out array, just reverse it :) On Thu, Sep 22, 2011 at 5:05 PM, Yogesh Yadav medu...@gmail.com wrote: @ratan: thanks for correction little correction in my logic... start from rightmost digit and search towards left a digit

Re: [algogeeks] Flip kart

2011-09-22 Thread Adi Srikanth
around 11.5 LPA gross Regards, Adi Srikanth. Mob No 9887233349 Personal Pages: adisrikanth.co.nr On Thu, Sep 22, 2011 at 11:55 AM, rahul sharma rahul23111...@gmail.comwrote: wats eligibility n package? On Thu, Sep 22, 2011 at 12:26 AM, sagar pareek sagarpar...@gmail.comwrote: nit

Re: [algogeeks]

2011-09-22 Thread Yogesh Yadav
Ans. 512 ... On Thu, Sep 22, 2011 at 5:38 PM, Rohit Upadhyaya mailtoroh...@gmail.comwrote: int main() { int a=256; char *p=a; *++p=2; printf(%d,a); return(0); } -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: [algogeeks]

2011-09-22 Thread anshu mishra
suppose adress of a = 0x12; 0x12 has 0x13 has 0001 so p = 0x12; p++ = 0x13; now modifying the value pointed p by will modify the only 0x13 bcoz it is char type pointer and its value wiil be 0010 so finally 0x12 to 0x15 will have 512 -- You received this message because you are

Re: [algogeeks]

2011-09-22 Thread Anup Ghatage
512 Because: a will have the binary value of 256. a is an integer, so it will be stored over 4 bytes like this: a 0001 byte1 byte2 byte3 byte4 now a char pointer with point to one byte., and here the first byte. p \/ 0001 byte1 byte2 byte3 byte4 incrementing p

Re: [algogeeks]

2011-09-22 Thread rohit jangid
isn't that simply because if little indian endian way of storing bytes in memory initial -- 0001 0.. finally-- 0010 0.. On Sep 22, 2011 5:38 PM, Rohit Upadhyaya mailtoroh...@gmail.com wrote: int main() { int a=256; char *p=a; *++p=2; printf(%d,a);

[algogeeks] Re: THANX ALGOGEEKS !!!!!!

2011-09-22 Thread abhishek
congrats dude hope u will be well connected with this group and help others to achieve their goals On Sep 22, 8:29 am, saurabh sah.saurab...@gmail.com wrote: I sincerely thank this group as i got selected in Microsoft IDC only because of this group . It was a wonderful experience for me at

[algogeeks] which is better?

2011-09-22 Thread Sahil Garg
n=n+1 n++ ++n which of the three is better ?? Sahil Garg Computer Engg. DCE -- You received this message because you are subscribed to the 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] C OUTPUT

2011-09-22 Thread Pradip Singh
number will be sored in 2'scomplement form .as 4=100 so its 1's comlement form will be 011 and adding 1 to it will result in 011+1=100.so -4 will be printed On Wed, Sep 21, 2011 at 10:23 AM, kartik sachan kartik.sac...@gmail.comwrote: @ravi i think ur concepts is correct the no is stored in

Re: [algogeeks] Re: THANX ALGOGEEKS !!!!!!

2011-09-22 Thread Manikanta Babu
Congrats buddy. Can you please post the interview questions here. It helps. Thanks, Mani On Thu, Sep 22, 2011 at 6:22 PM, abhishek abhishek.ma...@gmail.com wrote: congrats dude hope u will be well connected with this group and help others to achieve their goals On Sep 22, 8:29 am,

Re: [algogeeks] Paypal Interview questions

2011-09-22 Thread Sahil Garg
hey.. plz post your experience?? Sahil Garg Computer Engg. DCE On Wed, Aug 3, 2011 at 11:54 PM, Deepak deepakthegi...@gmail.com wrote: Can anyone pls post Paypal written questions and important subjects or topics to prepare for written as well as for tech interview?? Thanks in advance...

Re: [algogeeks] Re: Paypal

2011-09-22 Thread Sahil Garg
hey plz post ur experience?? Sahil Garg Computer Engg. DCE On Mon, Aug 8, 2011 at 8:43 PM, siva viknesh sivavikne...@gmail.com wrote: not sure i m also gonna attend wit u only if u r from anna univ :P On Aug 6, 7:44 pm, swetha rahul swetharahu...@gmail.com wrote: Thanks Siva... Is it

Re: [algogeeks] which is better?

2011-09-22 Thread madhav mohan
prefix operator is better.the compiler does not have to maintain the copy of the variable as in the postfix operator .. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks] Re: THANX ALGOGEEKS !!!!!!

2011-09-22 Thread saurabh
thanx to all I have shared my interview experience at http://msidcinterview.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

[algogeeks] Re: MICROSOFT IDC

2011-09-22 Thread saurabh
thanx to all @sanjay I have shared my interview experience at http://msidcinterview.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,

Re: [algogeeks] Re: question

2011-09-22 Thread Dheeraj Sharma
@bharat...so i thnk 7585 shud hav 7855 as ans..!! On Thu, Sep 22, 2011 at 5:42 PM, Arpit Sood soodfi...@gmail.com wrote: @yogesh nice algo... it is not even required to sort the left out array, just reverse it :) On Thu, Sep 22, 2011 at 5:05 PM, Yogesh Yadav medu...@gmail.com wrote:

Re: [algogeeks] Re: Microsoft Question

2011-09-22 Thread kartik sachan
@dheeraj i didn't get what u want to say explain me with the help of example -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] Re: MICROSOFT IDC

2011-09-22 Thread Sanjay Rajpal
Saurabh : Thank u very much :) Sanju :) On Thu, Sep 22, 2011 at 6:15 AM, saurabh sah.saurab...@gmail.com wrote: thanx to all @sanjay I have shared my interview experience at http://msidcinterview.blogspot.com/ -- You received this message because you are subscribed to the Google Groups

[algogeeks] Re: which is better?

2011-09-22 Thread Gene
No modern compiler will see these as different. Use the one you find prettiest. On Sep 22, 8:54 am, Sahil Garg garg.sahi...@gmail.com wrote: n=n+1 n++ ++n which of the three is better ?? Sahil Garg Computer Engg. DCE -- You received this message because you are subscribed to the

[algogeeks] Re: which is better?

2011-09-22 Thread Don
If the value of the expression is not being used, ++n is preferred. Most coding standards used by big companies require the prefix operator to be used unless the pre-incremented value is required. Don On Sep 22, 7:54 am, Sahil Garg garg.sahi...@gmail.com wrote: n=n+1 n++ ++n which of the

Re: [algogeeks] Flip kart

2011-09-22 Thread sagar pareek
12.5 On Thu, Sep 22, 2011 at 5:49 PM, Adi Srikanth adisriika...@gmail.comwrote: around 11.5 LPA gross Regards, Adi Srikanth. Mob No 9887233349 Personal Pages: adisrikanth.co.nr On Thu, Sep 22, 2011 at 11:55 AM, rahul sharma rahul23111...@gmail.comwrote: wats eligibility n package?

Re: [algogeeks] easy c output....

2011-09-22 Thread amrit harry
@balaji +1 :) On Thu, Sep 22, 2011 at 2:01 PM, Anil Arya anilarya...@gmail.com wrote: thanx Balaji:) On Thu, Sep 22, 2011 at 6:07 AM, Balaji balaji.subraman...@gmail.comwrote: Hi Anil, #a is a preprocessor operator to convert the argument specified as string or enclosing in double

[algogeeks] Help for Pep Exam

2011-09-22 Thread Suganya
Can anyone tell me some suggestions to prepare for Pep exam...? -- You received this message because you are subscribed to the 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: which is better?

2011-09-22 Thread DIPANKAR DUTTA
Depends on compiler architecture , and how they use instruction set architecture ( Increment Op) of underlining machine On Thu, Sep 22, 2011 at 7:21 AM, Don dondod...@gmail.com wrote: If the value of the expression is not being used, ++n is preferred. Most coding standards used by big

Re: [algogeeks] Re: which is better?

2011-09-22 Thread Prateek Jain
depends on the requirement of the code... On Thu, Sep 22, 2011 at 11:00 AM, DIPANKAR DUTTA dutta.dipanka...@gmail.com wrote: Depends on compiler architecture , and how they use instruction set architecture ( Increment Op) of underlining machine On Thu, Sep 22, 2011 at 7:21 AM, Don

Re: [algogeeks] easy c output....

2011-09-22 Thread sukran dhawan
awesome :) On Thu, Sep 22, 2011 at 7:55 PM, amrit harry dabbcomput...@gmail.comwrote: @balaji +1 :) On Thu, Sep 22, 2011 at 2:01 PM, Anil Arya anilarya...@gmail.com wrote: thanx Balaji:) On Thu, Sep 22, 2011 at 6:07 AM, Balaji balaji.subraman...@gmail.comwrote: Hi Anil, #a is a

[algogeeks] error in c++ program

2011-09-22 Thread Rajesh Kumar
how we can remove error ? #includeiostream using namespace std; class time { int m; int h; public: void set(int,int); void sum(time,time,time); void display(); }; void time::set(int x,int y) { m=x; h=y; } void time::sum(time t1,time t2,time t3) { m=t1.m+t2.m+t3.m; h=t1.h+t2.h+t3.h; } void

[algogeeks] Re: error in c++ program

2011-09-22 Thread Don
Give us some help. What is the error? Syntax error? Logic error? Runtime error? On Sep 22, 10:47 am, Rajesh Kumar testalgori...@gmail.com wrote: how we can remove error ? #includeiostream using namespace std; class time { int m; int h; public: void set(int,int); void

Re: [algogeeks] Re: error in c++ program

2011-09-22 Thread payal gupta
#includeiostream.h class time { int m; int h; public: void set(int,int); void sum(time,time,time); void display(); }; void time::set(int x,int y) { m=x; h=y; } void time::sum(time t1,time t2,time t3) { m=t1.m+t2.m+t3.m; h=t1.h+t2.h+t3.h; } void time::display(void) { coutminute==mendl;

Re: [algogeeks] Re: error in c++ program

2011-09-22 Thread Rajesh Kumar
not working by changes provide by you On Thu, Sep 22, 2011 at 9:42 PM, payal gupta gpt.pa...@gmail.com wrote: #includeiostream.h class time { int m; int h; public: void set(int,int); void sum(time,time,time); void display(); }; void time::set(int x,int y) { m=x; h=y; } void

Re: [algogeeks] Re: error in c++ program

2011-09-22 Thread nandhini siva
plz help 4 me.. Is thr any1 knw how to write the code in trust calculation?... On Thu, Sep 22, 2011 at 9:57 PM, Rajesh Kumar testalgori...@gmail.comwrote: not working by changes provide by you On Thu, Sep 22, 2011 at 9:42 PM, payal gupta gpt.pa...@gmail.com wrote:

[algogeeks] Re: Paypal

2011-09-22 Thread siva viknesh
Interview Questions and Experiences(Jeeva): This is the most easiest interview I’ve seen compared to microsoft,amazon,directi and morgan stanley. They’ve just asked basics in all. Technical interview 1: First he asked about the subjects I’m studying this semester(I couldn’t remenber

[algogeeks] plz reply quickly

2011-09-22 Thread Ishan Aggarwal
How will u detect if a queue is circular or not?? -- Kind Regards Ishan Aggarwal [image: Aricent Group] Presidency Tower-A, M.G.Road,Sector-14 Gurgaon,Haryana.122015 INDIA Phone : +91-9654602663 ishan2.aggar...@aricent.com puneet.ar...@aricent.com -- You received this message because you are

[algogeeks] Re: Paypal

2011-09-22 Thread siva viknesh
first round was mixture of c , cpp , very few general aps and few subjective ques print semicolon without using semicolon anywhere in program 2 trains in opposite dir...wat time they ll meet... On Sep 22, 9:36 pm, siva viknesh sivavikne...@gmail.com wrote: Interview Questions and

Re: [algogeeks] plz reply quickly

2011-09-22 Thread sukran dhawan
queue represnted as array or linked list ? On Thu, Sep 22, 2011 at 10:08 PM, Ishan Aggarwal ishan.aggarwal.1...@gmail.com wrote: How will u detect if a queue is circular or not?? -- Kind Regards Ishan Aggarwal [image: Aricent Group] Presidency Tower-A, M.G.Road,Sector-14

Re: [algogeeks] plz reply quickly

2011-09-22 Thread Ishan Aggarwal
In both the cases... what would be the condition? On Thu, Sep 22, 2011 at 10:19 PM, sukran dhawan sukrandha...@gmail.comwrote: queue represnted as array or linked list ? On Thu, Sep 22, 2011 at 10:08 PM, Ishan Aggarwal ishan.aggarwal.1...@gmail.com wrote: How will u detect if a queue is

Re: [algogeeks] plz help

2011-09-22 Thread rohit jangid
got 45 on linux than tried with fflush(stdout) and got 9 which is correct . so I guess that both child and parent process getting the same buffer and thus resulting in more number of hello correct answer is 9 as already mentioned On Sep 21, 2011 7:57 PM, sush57 sushaant...@gmail.com wrote:

[algogeeks] Doubts about realloc

2011-09-22 Thread Ankuj Gupta
Hi I have a doubt in functioning of realloc. Can we use realloc to shrink the memory already allocated ? If yes, will it also free the left over memory or programmer has to do it ? Also, while reallocating if it has to move to some other location does the earlier location gets freed or is it

Re: [algogeeks] Re: THANX ALGOGEEKS !!!!!!

2011-09-22 Thread Prakash D
congrats brother!! On Thu, Sep 22, 2011 at 6:42 PM, saurabh sah.saurab...@gmail.com wrote: thanx to all I have shared my interview experience at http://msidcinterview.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To

Re: [algogeeks] plz reply quickly

2011-09-22 Thread sukran dhawan
use hair and tortoise rule for lists i don think we can do it for arrays On Thu, Sep 22, 2011 at 10:22 PM, Ishan Aggarwal ishan.aggarwal.1...@gmail.com wrote: In both the cases... what would be the condition? On Thu, Sep 22, 2011 at 10:19 PM, sukran dhawan sukrandha...@gmail.comwrote:

Re: [algogeeks] Re: THANX ALGOGEEKS !!!!!!

2011-09-22 Thread sukran dhawan
congrats On Thu, Sep 22, 2011 at 10:33 PM, Prakash D cegprak...@gmail.com wrote: congrats brother!! On Thu, Sep 22, 2011 at 6:42 PM, saurabh sah.saurab...@gmail.com wrote: thanx to all I have shared my interview experience at http://msidcinterview.blogspot.com/ ta -- You received

Re: [algogeeks] Re: error in c++ program

2011-09-22 Thread rahul vatsa
time is a keyword in c/cpp, change time to any other string in ur code nd it will work. On Thu, Sep 22, 2011 at 12:27 PM, Rajesh Kumar testalgori...@gmail.comwrote: not working by changes provide by you On Thu, Sep 22, 2011 at 9:42 PM, payal gupta gpt.pa...@gmail.com wrote:

[algogeeks] Re: Doubts about realloc

2011-09-22 Thread Don
Realloc will resize a block of memory larger or smaller. If it requires that the block be moved, it will copy the contents of the old memory into the new location and free the old memory. Don On Sep 22, 12:01 pm, Ankuj Gupta ankuj2...@gmail.com wrote: Hi I have a doubt in functioning of

Re: [algogeeks] Re: error in c++ program

2011-09-22 Thread abhinav gupta
@rahul +1 On Thu, Sep 22, 2011 at 11:20 PM, rahul vatsa vatsa.ra...@gmail.com wrote: time is a keyword in c/cpp, change time to any other string in ur code nd it will work. On Thu, Sep 22, 2011 at 12:27 PM, Rajesh Kumar testalgori...@gmail.comwrote: not working by changes provide by you

Re: [algogeeks] Re: error in c++ program

2011-09-22 Thread Rajesh Kumar
thanx Rahul On Thu, Sep 22, 2011 at 11:54 PM, abhinav gupta abhinav@gmail.comwrote: @rahul +1 On Thu, Sep 22, 2011 at 11:20 PM, rahul vatsa vatsa.ra...@gmail.comwrote: time is a keyword in c/cpp, change time to any other string in ur code nd it will work. On Thu, Sep 22, 2011 at

Re: [algogeeks] Re: informatica pattern and question of interview

2011-09-22 Thread Sahil Garg
eg : original : 0 1 2 3 4 corrupted : 3 4 0 1 2 this can be done as below.. compare the middle element with first and the last element.. if middle first chk for first half else chk for second half above eg. middle = 0 first = 3 last = 2 as 03 consider 3 4 0 middle = 4 first =

[algogeeks] Questions on Graphs

2011-09-22 Thread Ankur Garg
Hi Frnds Can anybody suggest me some questions typically asked on Graphs . Couldnt find much in the internet If some one can share link or few questions on Graphs it will be really helpful Thanks in Advance Ankur -- You received this message because you are subscribed to the Google Groups

[algogeeks] Permuations and Combinations

2011-09-22 Thread kumar raja
(1) What is the efficient approach to generate permutations of a given sequence of numbers (may contain duplicates) in lexicographic order e.g. i/p: 5,1,6,1 o/p: 1 1 5 6 1 1 6 5 1 5 1 6 1 5 6 1 1 6 1 5 1 6 5 1 5 1 1 6 5 1 6 1 5 6 1 1 6 1 1 5 6 1 5 1 6 5 1 1 what is the time complexity of ur

Re: [algogeeks] Re: Paypal

2011-09-22 Thread Sahil Garg
thnx siva.. Sahil Garg Computer Engineering Delhi College of Engineering On Thu, Sep 22, 2011 at 10:10 PM, siva viknesh sivavikne...@gmail.comwrote: first round was mixture of c , cpp , very few general aps and few subjective ques print semicolon without using semicolon anywhere in

Re: [algogeeks] Flip kart

2011-09-22 Thread aditya kumar
11.5 fr our college they will hve online test .. 3 coding question and u need to attempnt any two ..25mcq's .. mcq;s wer mostly frm sql .. Q- Given a linked list find whether the linked list is palindrome or not. I gave him solution by modifying the linked list then i gave solution using extra

Re: [algogeeks] Flip kart

2011-09-22 Thread aditya kumar
those three question they ASKD me in interview nt in coding round n they are very particular abt coding On Fri, Sep 23, 2011 at 1:53 AM, aditya kumar aditya.kumar130...@gmail.comwrote: 11.5 fr our college they will hve online test .. 3 coding question and u need to attempnt any two ..25mcq's

[algogeeks] Re: Permuations and Combinations

2011-09-22 Thread Don
Start by making a copy of the input array containing the sequence of numbers. Sort the array. We'll call the copy A[n]. permute(int *a, int n, int k, int p=0) { if (p == k) output(a); else { int tmp = a[p]; for(int i = p; i n; ++i) { a[p] = a[i];

[algogeeks] Re: Permuations and Combinations

2011-09-22 Thread Don
Start by making a copy of the input array containing the sequence of numbers. Sort the array. We'll call the copy A[n]. permute(int *a, int n, int p=0) { if (p == n) output(a); else { int tmp = a[p]; for(int i = p; i n; ++i) { a[p] = a[i]; permute(a,n,p+1,k-1);

[algogeeks] Re: Permuations and Combinations

2011-09-22 Thread Don
Start by making a copy of the input array containing the sequence of numbers. Sort the array. We'll call the copy A[n]. permute(int *a, int n, int p=0) { if (p == n) output(a); else { int tmp = a[p]; for(int i = p; i n; ++i) { a[p] = a[i]; a[i] = tmp;

[algogeeks] Re: Questions on Graphs

2011-09-22 Thread Don
Given an undirected graph in which each edge has a capacity, find the maximum capacity from node A to node B. Given a directed graph where each edge has a cost, find the lowest cost path from node A to node B. Find the minimal spanning tree of a weighted, connected graph. On Sep 22, 2:03 pm,

Re: [algogeeks] Re: question

2011-09-22 Thread Piyush Kapoor
Isn't it simply finding the next permutation of a number??? On Thu, Sep 22, 2011 at 7:01 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: @bharat...so i thnk 7585 shud hav 7855 as ans..!! On Thu, Sep 22, 2011 at 5:42 PM, Arpit Sood soodfi...@gmail.com wrote: @yogesh nice algo... it

Re: [algogeeks] Re: Questions on Graphs

2011-09-22 Thread Ankur Garg
Thanks Don :) On Fri, Sep 23, 2011 at 2:51 AM, Don dondod...@gmail.com wrote: Given an undirected graph in which each edge has a capacity, find the maximum capacity from node A to node B. Given a directed graph where each edge has a cost, find the lowest cost path from node A to node B.

Re: [algogeeks] Re: question

2011-09-22 Thread Abhishek Goswami
I have seen code and output but I think it should be 7965 am i right? if you are looking for first largest On Thu, Sep 22, 2011 at 12:46 AM, Anil Arya anilarya...@gmail.com wrote: http://ideone.com/pmil8 On Thu, Sep 22, 2011 at 12:46 AM, Anil Arya anilarya...@gmail.com wrote: @kartik Is

Re: [algogeeks] Re: Microsoft Question

2011-09-22 Thread Dheeraj Sharma
@kartik.,...where are u searching..that ..the next character should be present..only around the 8 possible locations around that character On Thu, Sep 22, 2011 at 6:34 AM, kartik sachan kartik.sac...@gmail.comwrote: @dheeraj i didn't get what u want to say explain me with the help of example

[algogeeks] AMDOCS

2011-09-22 Thread aayush jain
can anybody tell me the pattern of amdocs written test and interview qus. its urgent so plz -- You received this message because you are subscribed 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: THANX ALGOGEEKS !!!!!!

2011-09-22 Thread praneethn
congrats dude On Thu, Sep 22, 2011 at 10:51 PM, sukran dhawan sukrandha...@gmail.comwrote: congrats On Thu, Sep 22, 2011 at 10:33 PM, Prakash D cegprak...@gmail.com wrote: congrats brother!! On Thu, Sep 22, 2011 at 6:42 PM, saurabh sah.saurab...@gmail.com wrote: thanx to

Re: [algogeeks] Re: question

2011-09-22 Thread Shravan Kumar
@Yogesh Yadav algo geek's approach is correct. With your number 759845. When you start moving left from right most integer, you stop when the numbers are no longer in increasing order, in this case you stop at first integer i.e, at 5 and swap with 4. Which gives exactly same correct answer as you