[algogeeks] Need help
Hi All, Has anybody solved the following problem? https://www.careercup.com/question?id=5196860946907136 -Pawan -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.
[algogeeks] MindTickle Interview process
Hi All, Has anybody experienced the interview process with MindTickle Pune? If yes, please share the problems. Thanks, Pawan -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.
[algogeeks] Designing Interview questions
Hi All, Can anyone please let me know where can I read/understand about questions like "Design a Car Service center", I see this type of questions in many interview sets. What do interviewer expect in this type of questions? It would be great help. -Pawan -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.
[algogeeks] Print the diameter of a binary tree
Hi All, I know how to find the diameter of given binary tree but i don't know how to print the diameter (this longest path). Can somebody please give a code snippet for this? Thanks, Pawan. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.
[algogeeks] Implement lastindexofastring(String s1,String s2)
Hi All, How can we do the following problem in efficient way : Implement lastindexofastring(String s1,String s2) . If s2 is present multiple times return the last index of s2 in s1 , else return -1. Is KMP applicable for this problem? If yes, then how can we modify KMP algo? Thanks, Pawan. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.
[algogeeks] output
Hi All, I'm not able to get output of following c program : #includestdio.h main() { int a[] ={ 1,2,3,4,5,6,7}; char c[] = {'a','x','h','o','k'}; //printf(%u %u\n, a[3], a[0]); line 6 printf(%d %d %d %d \n, (a[3]-a[0])); } If line 6 is commented, output : 3 1562814827 1869117537 0 Confusion : why is there 4 output? (a[3]-a[0]) should give only one. if line 6 is not commented, output : 1554221244 1554221232 3 1554221232 1309214001 64 Can anybody please explain why/how these outputs are coming? Thanks, Pawan. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.
Re: [algogeeks] output
@rahul thanks for reply o/p (of 1st program) : constructor constructor print statement destructor destructor here copy constructor is not called ... that's why i have posted this program On Tue, Jul 12, 2011 at 10:42 PM, rahul rahulr...@gmail.com wrote: Hi, In first program,it will call copy constructor once, while returning object by value. In 2nd program it will call copy constructor twice, once when u pass an object to function by value, and 2nd time when you return an object by value from function. Thanks. On Tue, Jul 12, 2011 at 11:52 PM, segfault pawan1991ya...@gmail.comwrote: #includeiostream using namespace std; class x{ int p; public: x(){coutconstructor\n;} x(const x y) { coutcopy constructor\n; } ~x() { cout destructor\n; } void print() { coutprint statement\n; } }; x g() { x b; b.print(); return b; } int main() { x b; x t=g(); } #includeiostream using namespace std; class x{ int p; public: x(){coutconstructor\n;} x(const x y) { coutcopy constructor\n; } ~x() { cout destructor\n; } void print() { coutprint statement\n; } }; x g(x b) { b.print(); return b; } int main() { x b; x t=g(b); } why first one is not calling copy constructor in function g() while returning from it but second one is calling copy constructor in function g() while returning from it? in both program inside g() b is local but why giving different result. bruce ackel page number:467 please explain it. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] regarding output
one more problem is there int main() { short int a,b,c; scanf(%d,a); sacnf(%d,b); c=a+b; printf(c=%d,c); return(0); } if a=30,b=40, then c=40; and if a=40,b=30, then c=30; why it is ? eplain in details On Tue, Oct 12, 2010 at 2:55 AM, carry pawan1991ya...@gmail.com wrote: int main() { int i; char c; for(i=0;i5;i++) { scanf(%d,c); printf(%d,c); } } why the program scans only one time if u give an alphabet as an input?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: palindromic base
we have to find the base greater than or equal to 2 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.