[algogeeks] Least Common Ancestor in STL MAP
Given a STL map, say mapint, bool m1. Given two value a b that may or may not exists in m1. Find the Least Common Ancestor in STL MAP. Remember you don't have access to root, so you need to iterate using iterator. Use the methods/function of MAP forex begin, end, find etc. Solution should be efficient in terms of time complexity (forex if we use method find, we get it in O(logN) internally) -- 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. For more options, visit https://groups.google.com/groups/opt_out.
Re: [algogeeks] Flipkart test
Thanks bro On 9 October 2012 21:16, Prakhar Jain jprakha...@gmail.com wrote: And it was for on-campus. For off-campus,it may differ and I have no idea about it. -- Prakhar Jain IIIT Allahabad B.Tech IT 4th Year Mob no: +91 9454992196 E-mail: rit2009...@iiita.ac.in jprakha...@gmail.com On Tue, Oct 9, 2012 at 9:05 PM, Prakhar Jain jprakha...@gmail.com wrote: Firstly, there is a written test in which there are 30 MCQs and 2 coding questions. MCQs cover all major topics such as algorithms,data structures, OS, DBMS, C. Coding questions has to be done to get place in Interviews. Otherwise, 1 coding question done correctly and efficiently, with good performance in MCQs can also give u a chance. Then, there are 2-3 round of face-to-face interviews which only concentrate on algorithm designing. No OS. No DBMS.( I mean no Technical rounds are there ) Last Interview is HR one which has few HR ques such as What is team work...?,etc. and 2-3 puzzles. On 10/9/12, Manish Patidar manishpatidar...@gmail.com wrote: NO DUDE Thank you, Have a great day !! * With Regards, * * Manish Patidar.* On Tue, Oct 9, 2012 at 9:47 AM, Avinash Mishra mishra.avinas...@gmail.comwrote: Hello any one have idea about Flipkart recruitment process for SDE1. Please guide me what to prepare. Thanks -- regard's Avinash -- 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. -- -- Prakhar Jain IIIT Allahabad B.Tech IT 4th Year Mob no: +91 9454992196 E-mail: rit2009...@iiita.ac.in jprakha...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- regard's Avinash -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Flipkart test
Hello any one have idea about Flipkart recruitment process for SDE1. Please guide me what to prepare. Thanks -- regard's Avinash -- 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] Re: Microsoft online questions : DLL to bst??
http://www.geeksforgeeks.org/archives/17629 On 2 August 2012 19:50, Daksh Talwar dakshtal...@gmail.com wrote: When asked , try to make the most balanced one . otherwise there are many possible BSTs for a given array/linked list. On Thu, Aug 2, 2012 at 5:05 PM, Umer Farooq the.um...@gmail.com wrote: A LinkedList is by itself is a BST such that one child node of each node is null. Do we need a simple BST or height balanced BST? On Tue, Jul 31, 2012 at 2:39 PM, Ashish Goel ashg...@gmail.com wrote: how would you do convert sorted doubly linked list to bst using same nodes as in DLL Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Sun, Jul 29, 2012 at 10:30 PM, Purani Sekar nagapur...@gmail.comwrote: convert sorted doubly linked list to bst using same nodes as in DLL -- 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. -- Umer -- 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. -- - - - - - - - - - - - - With Regards Daksh Talwar -- 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. -- aviNash -- 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] Binomial Coefficients
BigInteger Class in Java On 30 July 2012 21:14, Kishore kkishoreya...@gmail.com wrote: Python has no int limits On Mon, Jul 30, 2012 at 11:27 AM, shiva@Algo shiv.jays...@gmail.comwrote: Hey Guys, how to solve this problem where the input size is 500 digit Integer?? https://www.interviewstreet.com/challenges/dashboard/#problem/4fe19c4f35a0e -- 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. -- aviNash -- 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] directi paper pattern
Please mail me too thaks in advance / On 31 July 2012 21:42, md shaukat ali ali.mdshau...@gmail.com wrote: On Tue, Jul 31, 2012 at 7:37 PM, deepikaanand swinyanand...@gmail.comwrote: can anyone tell me the pattern (selection procedure )followed by directi this year -- 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/-/uaKshpROlGoJ. 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. i have mailed u recently asked question by direct i in nit allahabad..make a view on 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. -- With Regard's Avinash -- 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] directi paper pattern
hey please mail me too...please give a pastebin link On 31 July 2012 21:51, neelpulse(Jadavpur University) neelpu...@gmail.comwrote: Hey, can you please mail me too? -Thanks Nilanjan Basu On Tuesday, July 31, 2012 9:49:15 PM UTC+5:30, MUDIT wrote: Please forward the mail to me as well. Thanks -- Mudit Sadana Undergraduate Student,Computer Science NSIT, Delhi University,India -- 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/-/2YdFa0ZwOIsJ. 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. -- With regard's Avinash -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] adobe aptitude test
Could u tell me about question u got?? On 25 July 2012 22:02, Amit Jain aj201...@gmail.com wrote: I assumed, You were called for Interview off-campus. It depends upon the profile You have been called for. BTW it was too easy for White box testing. On Wed, Jul 25, 2012 at 8:13 PM, deepikaanand swinyanand...@gmail.comwrote: can anybody tell me which topics are asked in adobe apti test...and what is the usual level of qs asked in aptitude test... -- 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/-/hdqti4gC8igJ. 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. -- With Regard's Avinash Mishra -- 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] Directi Written Q 2012
#includeiostreamusing namespace std;int main(){int count=0;int count1=0;for(int i=0;i11;i++){ count=0;for(int j=0;j4;j++)if((i (1j)) 0){count++;} count1+=count;}coutcount1;return 0;} it will be better if u use java limit of j will be more in case 100 or 200 so use If Integer.Bitcount() value if it is int k then for(int j=0;jk;j++) hope u got it On 24 July 2012 15:09, ruru soupti...@gmail.com wrote: find no. of 1's in binary format of numbers from 1 to 100. like for 1 to 10 answer is 17 -- 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. -- aviNash -- 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] 3 sum problem
could u please explain ur soln via abinary serach?? On 22 July 2012 19:14, Victor Manuel Grijalva Altamirano kavic1.mar...@gmail.com wrote: on solution it's with brute force, with three for's, for i=0; ilengthS (to find a) for j=0; jlengthS (to find b) for k=0; klengthS (to find c) if(i!=j and j!=k and i!=k) if(s[i]+s[j]+s[k]==0)printf(find it) other solution it's with binary search. 2012/7/22 lomash goyal lomesh.go...@gmail.com Given an array *S* of *n* integers, are there elements *a*, *b*, *c* in * S* such that *a* + *b* + *c* = 0? Find all unique triplets in the array which gives the sum of zero. -- 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/-/3cOK_JrSYEsJ. 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. -- Victor Manuel Grijalva Altamirano Universidad Tecnologica de La Mixteca -- 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. -- aviNash -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Largest Path in Tree [SPOJ BENFECT]
Some how I found that we need to run bfs twice to get the largest distance between any two nodes of a tree. Please explain me how it works. regards, avinash -- 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/-/jodahB_dChYJ. 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] Re: Largest Path in Tree [SPOJ BENFECT]
no this problem is different from finding the longest path which is actually maximum number of nodes covered in the longest path On Sat, Jun 23, 2012 at 5:45 PM, Navin Kumar algorithm.i...@gmail.comwrote: Is longest path between two node in a tree is equal two logest path between two leaves?? On Sat, Jun 23, 2012 at 5:35 PM, Navin Kumar algorithm.i...@gmail.comwrote: Is this similar to finding the diameter of a tree(longest disteance between two leaves) ?? If yes than visit this link http://www.cs.duke.edu/courses/spring00/cps100/assign/trees/diameter.html On Sat, Jun 23, 2012 at 2:44 PM, Avinash jain.av...@gmail.com wrote: Some how I found that we need to run bfs twice to get the largest distance between any two nodes of a tree. Please explain me how it works. regards, avinash -- 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/-/jodahB_dChYJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards, avinash (+91) 9502681447 -- 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] Re: Largest Path in Tree [SPOJ BENFECT]
you are just finding the diameter of the tree. Remember the graph I am talking about is weighted. So if two adjacent vertices has infinite weight than that would be the longest distance between any two vertices in the graph. e.g. In you diagram suppose the sum of weight of the edges from a-b is 30. But in the graph suppose the weight of the left most edge (i.e. 4-6) is 40 then 4-6 is the longest distance not a-b. Let me know if I am making sense. On Sat, Jun 23, 2012 at 3:51 PM, Kumar Vishal kumar...@gmail.com wrote: What I can think is case is : 10 / \ 6 13 / \ 4 5 / \ \ 6 7 8 / \ \ 9 a b so from a-b is a-7-4-2-5-8-b 1- Left Tree then 2- Right Tree add them On Sat, Jun 23, 2012 at 3:49 PM, Kumar Vishal kumar...@gmail.com wrote: What I can think is case is : 1 / \ 2 3 / \ 4 5 / \ \ 6 7 8 / \ \ 9 a b so from a-b is a-7-4-2-5-8-b On Sat, Jun 23, 2012 at 2:44 PM, Avinash jain.av...@gmail.com wrote: Some how I found that we need to run bfs twice to get the largest distance between any two nodes of a tree. Please explain me how it works. regards, avinash -- 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/-/jodahB_dChYJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards Kumar Vishal _ *http://wethecommonpeople.wordpress.com/ * *h**ttp://kumartechnicalarticles.wordpress.com/http://kumartechnicalarticles.wordpress.com/ * _ -- Regards Kumar Vishal _ *http://wethecommonpeople.wordpress.com/ * *h**ttp://kumartechnicalarticles.wordpress.com/http://kumartechnicalarticles.wordpress.com/ * _ -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards, avinash (+91) 9502681447 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Scanf in an infinite loop
#include stdio.h void main() { while(1) { int opt; scanf(%d,opt); printf(%d\n,opt); } } when i execute this program, if i give a character instead of an integer, it goes into an infinite loop. why is it so? -- 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] Amazon - Interview Qn
That would work dheerjaj. Only thing is links reassignment should be taken care of. On Wed, Aug 31, 2011 at 10:40 AM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: remove the 'n' nodes from the beginning..push in the stack..pop them up and insert at the end of linked list..till the stack becomes empty..do this for(m/n) times..m is length of list.. correct me if i am wrong On Wed, Aug 31, 2011 at 6:57 AM, Reynald Suz reynaldsus...@gmail.comwrote: Question: Given: A singly linked list and a number 'n'. Write a program, that will reverse consecutive 'n' nodes in the linked list. Optimize for space and time. Example: Input: Linked list: A-B-C-D-E-F number 'n': 3 Output: C-B-A-F-E-D -- Regards Reynald Reni Masters in Software Engineering CIT - India -- 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. -- *Dheeraj Sharma* Comp Engg. NIT Kurukshetra -- 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] Re: Problem on overflow
@dave i was saying if user input a .. he can enter aintmax then how to detect overflow? -- 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] Re: Problem on overflow
@Saurabh being ready to run your code for unsatisfactory input doesn't seem more logical than trying to find out if you can do something about it. i would have loved a kind reply from you. -- 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] Re: Problem on overflow
@dave if number a is entered exceeding limit(already overflowed) then a goes negative(if a was entred just more than limit ) /a goes positive (if a was entred sufficiently more than limit ) maxint -a=b concept fails Avinash Katiyar NIT Allahabad -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Problem on overflow
@dave i was saying if user enter a+b in which aintmax .. A goes negative(if a sligtly intmax) a+b =no overflow which we know shouldnt be an answer.. On 8/28/11, Dave dave_and_da...@juno.com wrote: @Kunal: You are very kind. Dave On Aug 27, 12:58 pm, Kunal Patil kp101...@gmail.com wrote: @Dave: Still your approach to solve the problem remains correct. (subtracting a number from max possible value then comparing this difference with another number). So, no need to think that you were brain dead (If you were, you would have posted a movie story here)..[?] Mathematically it is wrong, not in terms of approach..[?] On Sat, Aug 27, 2011 at 11:02 PM, dipit grover digo.d.b...@gmail.comwrote: I think you just need to reverse the comparison operators in Dave's earlier post On Sat, Aug 27, 2011 at 10:59 PM, Dave dave_and_da...@juno.com wrote: @Abishek: I was brain-dead in my earlier posting. Let me try again: If either number is zero, the sum will not overflow. If the numbers have different signs, the sum will not overflow. If both numbers are positive, overflow will occur if b maxint - a. If both numbers are negative, overflow will occur if b -maxint - a - 1. Dave On Aug 27, 12:18 pm, Abhishek mailatabhishekgu...@gmail.com wrote: @Dave: i didn't understand, suppose a=3, b=31000 and MaxInt=32000; you are saying if (MaxInt-a)=b; then overflow will occur. but here condition is not satisfying. plz explain. -- 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. -- Dipit Grover B.Tech in CSE IIT Roorkee -- 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. 361.gif 1KViewDownload 360.gif 1KViewDownload- Hide quoted text - - Show quoted text - -- 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. -- Sent from my mobile device -- 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] Re: Concept of Pointer
++ is simply post increment will increment after use so *s is printed in first printf.. precedence doesnt matter coz its a single operand on which post increment has to be done also no copncept of associativity i think associativity is for same precedence operators .. Avinash NIT allahabad -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: COMMVAULT
Written- computer test with around 30 question with 4 options. They ask question on c- string operations (like strcpy, strstr etc), file system, binary tree, linked list, function pointer, array, malloc, free, structure, printf, scanf etc etc... all you need to solve. focus on these things in fact all basics of c. And all the best On Aug 21, 8:45 pm, cdr jay.kee...@gmail.com wrote: Plz tell me abt the written test and interview process in commvault...thanks in advance friends... -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] c output doubt
Pointer incrementation and subtraction are done in terms of memory blocks and not addresses of memory. For example, int *p; p++; The pointer here jumps to the next integer location and not the next address in memory. Similarly,pointer subtraction will give the difference in indexes and not the memory addresses. If you try subtracting an integer pointer and a float pointer, it will be an error. On Fri, Aug 12, 2011 at 11:34 AM, rohit rajuljain...@gmail.com wrote: int main() { int a[5]={1,2,3,4,5}; printf(%d,a[4]-a[0]) } why it show 4 not 16? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] c output doubt
On Fri, Aug 12, 2011 at 11:55 AM, Avinash Dharan avinashdha...@gmail.comwrote: Pointer incrementation and subtraction are done in terms of memory blocks and not addresses of memory. For example, int *p; p++; The pointer here jumps to the next integer location and not the next address in memory. Similarly,pointer subtraction will give the difference in indexes and not the memory addresses. If you try subtracting an integer pointer and a float pointer, it will be an error. On Fri, Aug 12, 2011 at 11:34 AM, rohit rajuljain...@gmail.com wrote: int main() { int a[5]={1,2,3,4,5}; printf(%d,a[4]-a[0]) } why it show 4 not 16? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Amazon - Longest palindrome in a string in O(n)
http://stevekrenzel.com/articles/longest-palnidrome But for some reason it is failing for string ISAAS, may be my understanding is incorrect. Thanks Avinash http://avi-programming-blog.blogspot.com/ On Jun 21, 11:31 pm, Swathi chukka.swa...@gmail.com wrote: Does any one know how to return the Longest palindrome in a string in O(n). From googling i found that we can use suffix trees but there is no code. I am looking for logic and also for running code. Thanks, Swathi -- 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] what to learn python or perl
I second them. Python would be my choice. On Wed, Mar 16, 2011 at 10:18 AM, pacific pacific pacific4...@gmail.comwrote: I vote for python. On Wed, Mar 16, 2011 at 10:03 AM, kracekumar ramaraju kracethekingma...@gmail.com wrote: Hello Python vs Perl been battle for more than 20 years.Perl is been around 23+ years(not sure,people say 25 years pls check) and python for 21 years. Python would be my choice 1.Python achieves code readability. 2.Python can do what perl can do. more on this fight you can find here http://infohost.nmt.edu/~tcc/help/lang/python/vsperl.html http://www.linuxjournal.com/article/3882 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- regards, chinna. -- 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] palindrome substring
check two types of palindromes.. even and odd and as soon as u get one. just expand on both sides to get the longest one.. even palindromes are arr[i]==arr[i+1] and odd palindromes are arr[i]==arr[i=2] On Fri, Jun 18, 2010 at 9:20 AM, Antony Vincent Pandian.S. sant...@gmail.com wrote: I remember this question under discussion recently. Please check the existing threads... On 6/17/10, debajyotisarma sarma.debajy...@gmail.com wrote: Find the longest palindrome in the given string. Minimum time-space complexity required (i have not solved it so don't know what is min) -- 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. -- Sent from my mobile device Luv, S.Antony Vincent Pandian -- 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. -- Avinash Dubey +91-7799562235 -- 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] Linear time sieve
well the complexity is not O(n) On Sun, Nov 29, 2009 at 7:20 PM, harit agarwal agarwalha...@gmail.comwrote: read this http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes -- 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. -- Avinash Dubey MNNIT Allahabad +91-9889922944 -- 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.
Fwd: [algogeeks] Re:
-- Forwarded message -- From: Dhruva Sagar dhruva.sa...@gmail.com Date: Tue, Jun 2, 2009 at 4:23 PM Subject: [algogeeks] Re: To: algogeeks@googlegroups.com Yea! You could confirm from the excel sheet...This place is not for such jokes Thanks Regards, Dhruva Sagar. George Bernard Shawhttp://www.brainyquote.com/quotes/authors/g/george_bernard_shaw.html - A government that robs Peter to pay Paul can always depend on the support of Paul. On Tue, Jun 2, 2009 at 4:21 PM, sharad kumar aryansmit3...@gmail.comwrote: 2+3=5*2=10, 7+2=9*7=63 6+5=11*6=66 8+4=12*8=96 7+9=16*9=144 am i rite?? --- live for nothing but we die for something-JOHN RAMBO On Tue, Jun 2, 2009 at 3:00 PM, Aminooo~ amin...@gmail.com wrote: *Dear Friends,* * * *A question for the genius, the one who solve the problem will write the name in the attached file.* *IF; 2+3=10* * 7+2=63* * 6+5=66* * 8+4=96* *THEN;* * 9+7=???* *The answer is the password to open the file attached* * * * * *Best Regards* *Aminooo.com* http://www.aminooo.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/algogeeks -~--~~~~--~~--~--~--- successor.xlsx Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet