Re: [algogeeks] Snapdeal Paper Pattern
Get yourself prepared for DS and Algo.. Thats it. On Fri, Aug 24, 2012 at 5:10 PM, vaibhav shukla vaibhav200...@gmail.comwrote: its DU . please guide with watever details you have. thanks On Fri, Aug 24, 2012 at 4:42 PM, JITESH KUMAR jkhas...@gmail.com wrote: Which college? I can help you. On Wed, Aug 22, 2012 at 11:23 PM, Arun Kindra arunkin...@gmail.comwrote: Anyone know the paper pattern or ques of snapdeal? And What they demand(any specific language)? -- Regards: *Arun Kindra* -- 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 Jitesh Kumar There is only one 'YOU' in this world. You are Unique and Special.* *Don't Ever Forget 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. -- best wishes!! Vaibhav -- 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 Jitesh Kumar There is only one 'YOU' in this world. You are Unique and Special.* *Don't Ever Forget 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.
Re: [algogeeks] Snapdeal Paper Pattern
Which college? I can help you. On Wed, Aug 22, 2012 at 11:23 PM, Arun Kindra arunkin...@gmail.com wrote: Anyone know the paper pattern or ques of snapdeal? And What they demand(any specific language)? -- Regards: *Arun Kindra* -- 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 Jitesh Kumar There is only one 'YOU' in this world. You are Unique and Special.* *Don't Ever Forget 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.
Re: [algogeeks] Re: Finding connection b/w 2 profiles
Neither depth is known nor we have to find the shortest path. We just have to find the path. -- *Regards Jitesh Kumar * -- 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: Finding connection b/w 2 profiles
Using DFS we can stuck in the blind ally as there is not limit of depth.. On Wed, Sep 14, 2011 at 4:16 PM, tech coder techcoderonw...@gmail.comwrote: we can also use dfs and find if there exist path between given two nodes(profiles here). if yea , there is a connection b/w two profiles. On Wed, Sep 14, 2011 at 1:58 PM, Azhar Hussain azhar...@gmail.com wrote: Union Find Algorithm would do - Azhar. On Wed, Sep 14, 2011 at 1:42 PM, JITESH KUMAR jkhas...@gmail.com wrote: Neither depth is known nor we have to find the shortest path. We just have to find the path. -- *Regards Jitesh Kumar * -- 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. -- *Regards Jitesh Kumar There is only one 'YOU' in this world. You are Unique and Special.* *Don't Ever Forget 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.
Re: [algogeeks] find the error
I guess, if file is not found, fopen will return -1. Which will evaluate the statement if(f=fopen(file.txt,r)) as true.. -- *Regards Jitesh Kumar There is only one 'YOU' in this world. You are Unique and Special.* *Don't Ever Forget 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.
[algogeeks] Finding connection b/w 2 profiles
Suppose you are visiting someone's profile in fb or linkedin, you get to know how you are connected to that person. e.g. Suppose you are visiting C's profile. you get a suggestion like you are connected to him via A-B-C. Tell efficient way to solve this problem( apart from Brute Force). -- *Regards Jitesh Kumar* -- 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] Finding connection b/w 2 profiles
I guess you have misunderstood the problem. We are not concerning about the length of path. We just have to find the path. But in the efficient way. suppose first person is having 500 friends and each of them again is having 500 friends each. Applying BFS will take a lot of space. On Tue, Sep 13, 2011 at 5:48 PM, veera reddy veeracool...@gmail.com wrote: finding the shortest path between A and C nodes , gives required solution . We can use dijkstra's algorithm to find the shortest path .. On Tue, Sep 13, 2011 at 5:43 PM, JITESH KUMAR jkhas...@gmail.com wrote: Suppose you are visiting someone's profile in fb or linkedin, you get to know how you are connected to that person. e.g. Suppose you are visiting C's profile. you get a suggestion like you are connected to him via A-B-C. Tell efficient way to solve this problem( apart from Brute Force). -- *Regards Jitesh Kumar* -- 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 , P Veera Reddy Devagiri Senior Under Graduate Computer Science and Engineering IIIT Hyderabad Mobile no-+91-9492024783 -- 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 Jitesh Kumar There is only one 'YOU' in this world. You are Unique and Special.* *Don't Ever Forget 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.
Re: [algogeeks] Re: Returning 0 with probability p and 1 with probability 1-p
@Dave: Thanks a lot.. :) On Tue, Sep 13, 2011 at 7:48 PM, Don dondod...@gmail.com wrote: @Dave: Very nice. Don On Sep 12, 10:51 pm, Dave dave_and_da...@juno.com wrote: Here's another way, using a rejection technique on the bits of the mantissa of p. Each iteration of the do-while loop exposes another high-order bit of p, and the do-while loop iterates as long as the random bits produced by f match the high order bit sequence of p. This most likely will use fewer evaluations of f() than Don's approach. int g(double p) { int i; do { i = p + p; p += p - i; } while( i == f() ); return 1 - i; } Dave On Sep 12, 10:19 am, Don dondod...@gmail.com wrote: For particular values of p we might be able to do better, but for unknown values of p, I can't think of anything better than this: int g(double p) { int n = 0; for(int i = 0; i 30; ++i) n += n+f(); return n (int)(p*1073741824.0); } On Sep 12, 9:55 am, JITESH KUMAR jkhas...@gmail.com wrote: Hi You are given a function f() that returns either 0 or 1 with equal probability. Write a function g() using f() that return 0 with probability p (where 0p1 ) -- *Regards Jitesh Kumar*- 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. -- *Regards Jitesh Kumar There is only one 'YOU' in this world. You are Unique and Special.* *Don't Ever Forget 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.
Re: [algogeeks] Finding connection b/w 2 profiles
Depth is not mentioned, it can be any. This question was asked from me in the telephonic interview of DE Shaw. The interviewer told me reduce space complexity. On Tue, Sep 13, 2011 at 6:18 PM, MeHdi KaZemI mehdi.kaze...@gmail.comwrote: I think applying BFS is good, what's the problem with space? Isn't the depth gonna be at most 2 ? If we suppose the depth is gonna be at most 2, then suppose we want the path from A to C, A has 500 friends and each of his/her friends has 500 friends too, so we have to visit 500*500 nodes to find the path, am I right? On Tue, Sep 13, 2011 at 5:11 PM, Karan Thakral karanthak...@gmail.comwrote: bfs On Tue, Sep 13, 2011 at 5:59 PM, JITESH KUMAR jkhas...@gmail.com wrote: I guess you have misunderstood the problem. We are not concerning about the length of path. We just have to find the path. But in the efficient way. suppose first person is having 500 friends and each of them again is having 500 friends each. Applying BFS will take a lot of space. On Tue, Sep 13, 2011 at 5:48 PM, veera reddy veeracool...@gmail.comwrote: finding the shortest path between A and C nodes , gives required solution . We can use dijkstra's algorithm to find the shortest path .. On Tue, Sep 13, 2011 at 5:43 PM, JITESH KUMAR jkhas...@gmail.comwrote: Suppose you are visiting someone's profile in fb or linkedin, you get to know how you are connected to that person. e.g. Suppose you are visiting C's profile. you get a suggestion like you are connected to him via A-B-C. Tell efficient way to solve this problem( apart from Brute Force). -- *Regards Jitesh Kumar* -- 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 , P Veera Reddy Devagiri Senior Under Graduate Computer Science and Engineering IIIT Hyderabad Mobile no-+91-9492024783 -- 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 Jitesh Kumar There is only one 'YOU' in this world. You are Unique and Special.* *Don't Ever Forget 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. -- Stay Hungry Stay Foolish MeHdi KaZemI -- 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 Jitesh Kumar There is only one 'YOU' in this world. You are Unique and Special.* *Don't Ever Forget 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.
[algogeeks] Returning 0 with probability p and 1 with probability 1-p
Hi You are given a function f() that returns either 0 or 1 with equal probability. Write a function g() using f() that return 0 with probability p (where 0p1 ) -- *Regards Jitesh Kumar* -- 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: Returning 0 with probability p and 1 with probability 1-p
Hi Dave, Can you please explain your approach? On Tue, Sep 13, 2011 at 9:21 AM, Dave dave_and_da...@juno.com wrote: Here's another way, using a rejection technique on the bits of the mantissa of p. Each iteration of the do-while loop exposes another high-order bit of p, and the do-while loop iterates as long as the random bits produced by f match the high order bit sequence of p. This most likely will use fewer evaluations of f() than Don's approach. int g(double p) { int i; do { i = p + p; p += p - i; } while( i == f() ); return 1 - i; } Dave On Sep 12, 10:19 am, Don dondod...@gmail.com wrote: For particular values of p we might be able to do better, but for unknown values of p, I can't think of anything better than this: int g(double p) { int n = 0; for(int i = 0; i 30; ++i) n += n+f(); return n (int)(p*1073741824.0); } On Sep 12, 9:55 am, JITESH KUMAR jkhas...@gmail.com wrote: Hi You are given a function f() that returns either 0 or 1 with equal probability. Write a function g() using f() that return 0 with probability p (where 0p1 ) -- *Regards Jitesh Kumar*- 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. -- *Regards Jitesh Kumar * -- 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
For N=3, multiple solutions exists 3 1 2 1 3 2 2 3 1 2 1 3 what about this?? On Wed, Feb 9, 2011 at 1:35 PM, jalaj jaiswal jalaj.jaiswa...@gmail.comwrote: yeah .. the input will bw given that only for which solution is possible On Wed, Feb 9, 2011 at 1:18 PM, Jitesh Kumar jitesh2...@gmail.com wrote: Can you give me solution for N=1 and N=2? I don't think that it is possible for every N. -- 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, *Jalaj Jaiswal* (+919019947895) Software developer, Cisco Systems Final Year Undergraduate, IIIT 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. -- 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
I didn't get you.. In your example One of the possible placement for 7 numbers in 14 positions is : 5 7 2 3 6 2 5 3 4 7 1 6 1 4 there is no perfect square... -- 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
Can you give me solution for N=1 and N=2? I don't think that it is possible for every N. -- 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.