Re: [algogeeks] Qualcomm
Hello yar, Please share the written paper format and interview questions. If dont want to display openly, plz share with my id mohitm.1...@gmail.com. It will be of great help to me. -- 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/-/GYJ2rAKzQE4J. 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] Paypal
Has anyone recently attended the placement procedure for paypal. Like how is it? -- 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/-/WzkQbuBpGlkJ. 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] Implementing a grep
If i have to code the functioning of grep what data structure is recommended for implementing it. I was thinking may be using trie with each node having a vector list of line numbers in which they appear. Is it the correct one or is there any better solution to this. -- 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/-/TnrBS2wCopMJ. 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] Paypal
around 25th 65 arnd 8 -- 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/-/7FtN8hsesrgJ. 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: Interview Question
Dont think that the corresponding elements should be same. XOR Should do it anyway. Btw other question How would you find the second largest element in an array using minimum no of comparisons?Any thing better than O(n).? On Sun, Jul 3, 2011 at 2:41 AM, aditya kumar aditya.kumar130...@gmail.comwrote: xor will only result if corresponding elements are same . what if in both the array set of integers are same but they arnt corresponding to each other ?? On Sun, Jul 3, 2011 at 2:37 AM, Dumanshu duman...@gmail.com wrote: xor all the elements of both arrays ==0 sum of 1st array == sum of 2nd array no. of elements in 1st == no. of elements in 2nd if the above conditions are met, they have the same set. m i missin sth? On Jul 3, 1:23 am, mittal mohitm.1...@gmail.com wrote: Given two arrays of numbers, find if each of the two arrays have the same set of ntegers ? Suggest an algo which can run faster than NlogN without extra space? -- 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. -- Mohit Mittal 4th year , Computer Engineering Student-Coordinator , DTU WebTeam Delhi Technological University -- 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] SPOJ : Problem 8055
https://www.spoj.pl/problems/AMR10A/ Logic : Cannot find the area on the fly for all Q - Precompute the area of all polygons with a segment joining 0 and x as end points. - We can do this by using area of [0,x-1] and area of triangle [0,x-1,x] I have implemented this but i am not able to find my error and i am getting wrong answer continuously. Someone help. #includeiostream #includecstdio #includecmath using namespace std; int main() { int n,q; int i,j,k; scanf(%d%d,n,q); int x[50009],y[50009]; double pro[50009]; for(i=0;in;i++) { scanf(%d%d,x[i],y[i]); } x[n]=x[0]; y[n]=y[0]; double p,p2; double sum=0.0,sum2=0.0,sum3=0.0; double area[50009]; double a1,a2,a3; double ar; pro[0]=(x[0]*y[1])-(x[1]*y[0]); pro[1]=(x[1]*y[2])-(x[2]*y[1]); sum+=pro[0]+pro[1]; area[0]=area[1]=0.0; for(i=2;in;i++) { a1=(x[0]*y[i-1])-(x[i-1]*y[0]); a2=(x[i-1]*y[i])-(x[i]*y[i-1]); a3=(x[i]*y[0])-(x[0]*y[i]); ar=(a1+a2+a3)/2; ar=fabs(ar); area[i]=ar+area[i-1]; } sum=area[n-1]; int a,b; for(i=0;iq;i++) { sum2=0.0; scanf(%d%d,a,b); if(a!=0) { a1=(x[0]*y[a])-(x[a]*y[0]); a2=(x[a]*y[b])-(x[b]*y[a]); a3=(x[b]*y[0])-(x[0]*y[b]); ar=(a1+a2+a3)/2; ar=fabs(ar); ar+=area[a]; sum2=area[b]-ar; sum2=fabs(sum2); } else{ sum2=area[b]; } sum3=sum-sum2; if(sum2sum3) printf(%.1lf\n,sum2); else printf(%.1lf\n,sum3); } 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 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.
[algogeeks] Re: mapping of 2-d arrays
how to use hash table i have a pair (a,b) with which i want to use. if i use hash function like a+nb there will be number of clashes. also , i have tried map stl in some of programs and most of them give TLE. So, is there a better way for this or i have to look a different approach to this. Thanks Mohit On Dec 19, 7:39 pm, juver++ avpostni...@gmail.com wrote: Use hash_table, it provides O(1) expected time for searching. -- 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.
[algogeeks] Re: mapping of 2-d arrays
its like i have two number a and b both can have max value 10^6. i have to store a value for the pair (a,b) i also want to access in O(1) time. On Dec 19, 5:41 pm, juver++ avpostni...@gmail.com wrote: How many elements you would have at all? -- 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.