[algogeeks] OFF TOPIC(QUERY)

2012-02-05 Thread adarsh kumar
hi friends I will be takng up amazon online test in a few days. Can any1 temme wat r the areas to concentrate on for this,and for their interviews? It would be great if sum1 can provide some info regarding this. regards, adarsh. -- You received this message because you are subscribed to the

Re: [algogeeks] OFF TOPIC(QUERY)

2012-02-05 Thread digcon9
Afair they appreciate service like design - so one if the advices learn about SOAP. And basic CS is essential for all interviews. 05.02.2012 12:58 пользователь adarsh kumar algog...@gmail.com написал: hi friends I will be takng up amazon online test in a few days. Can any1 temme wat r the

Re: [algogeeks] nyone having pointer in c ebook..plz mail me...

2012-02-05 Thread Veronica Sharma
i have pdf of pointers on c by Kenneth A Reek...but its 144 MB, cant send it on mail.. On Sat, Feb 4, 2012 at 4:33 PM, rahul sharma rahul23111...@gmail.comwrote: -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

Re: [algogeeks] nyone having pointer in c ebook..plz mail me...

2012-02-05 Thread saurabh singh
Kindly don't post more replies on this thread.This group is not for file sharing. Saurabh Singh B.Tech (Computer Science) MNNIT blog:geekinessthecoolway.blogspot.com On Sun, Feb 5, 2012 at 3:12 PM, Veronica Sharma sharma.veron...@gmail.comwrote: i have pdf of pointers on c by Kenneth A

Re: [algogeeks] Re: Reverse Engg.

2012-02-05 Thread anshu mishra
awesome question :D :D -- 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,

[algogeeks] ORDERS

2012-02-05 Thread shady
Hi, Any hints for this problem ? Link http://www.codechef.com/problems/ORDERS/ -- 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

[algogeeks] In a char string, find min distance between 2 letters, O(n) time, O(1) space.

2012-02-05 Thread Ashish Goel
Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 -- 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] In a char string, find min distance between 2 letters, O(n) time, O(1) space.

2012-02-05 Thread payal gupta
do u mean d min distance b/w two specific nos present in an array which may have repeated ele's??? Regards, PAYAL GUPTA, NIT-B. On Sun, Feb 5, 2012 at 7:51 PM, Ashish Goel ashg...@gmail.com wrote: Best Regards Ashish Goel Think positive and find fuel in failure +919985813081

Re: [algogeeks] In a char string, find min distance between 2 letters, O(n) time, O(1) space.

2012-02-05 Thread Ashish Goel
eg string is adcbeadabc min distance between a,b is 1 Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Sun, Feb 5, 2012 at 9:25 PM, payal gupta gpt.pa...@gmail.com wrote: do u mean d min distance b/w two specific nos present in an array which

[algogeeks] Re: In a char string, find min distance between 2 letters, O(n) time, O(1) space.

2012-02-05 Thread WgpShashank
@ashsih ..here is algo 1st Traverse array from left side and stop if either *a* or *b *are found. Store index of this first occurrence in a variable say first then Now traverse *array *after the index *first*. If the element at current index *i* matches with either x or y then check if it is

Re: [algogeeks] nyone having pointer in c ebook..plz mail me...

2012-02-05 Thread WgpShashank
@Saurabh People Can Ask for Free Materials until it violates copyright law , if someone has they can help each other through personal mail, there is nothing wrong in this . *Thanks Shashank Mani Narayan Computer Science Engineering Birla Institute of Technology,Mesra ** Founder Cracking

[algogeeks] Re: Spoj ABCPATH

2012-02-05 Thread WgpShashank
@trinity tell the link of problem ? *Thanks Shashank Mani Narayan Computer Science Engineering Birla Institute of Technology,Mesra ** Founder Cracking The Code Lab http://shashank7s.blogspot.com/* -- You received this message because you are subscribed to the Google Groups Algorithm

[algogeeks] Re: Disjoint Set data structure

2012-02-05 Thread WgpShashank
@Karthik ..You Can Look http://en.wikipedia.org/wiki/Ackermann_function#Inverse *Thanks Shashank Mani Narayan Computer Science Engineering Birla Institute of Technology,Mesra ** Founder Cracking The Code Lab http://shashank7s.blogspot.com/* -- You received this message because you are

Re: [algogeeks] Re: Disjoint Set data structure

2012-02-05 Thread chirag ahuja
Shashank is right, if someone is in the need of some book, why do some people here feel the need to post things like this is not a place for file sharing and crap.. You can just ignore the mail, and let the person who needs the book take help from others who are willing to help. On Sun, Feb 5,

Re: [algogeeks] nyone having pointer in c ebook..plz mail me...

2012-02-05 Thread chirag ahuja
Shashank is right, if someone is in the need of some book, why do some people here feel the need to post things like this is not a place for file sharing and crap.. You can just ignore the mail, and let the person who needs the book take help from others who are willing to help. On Sun, Feb 5,

Re: [algogeeks] Re: Disjoint Set data structure

2012-02-05 Thread chirag ahuja
sorry, replied on wrong thread. :p On Sun, Feb 5, 2012 at 11:42 PM, chirag ahuja sparkle.chi...@gmail.comwrote: Shashank is right, if someone is in the need of some book, why do some people here feel the need to post things like this is not a place for file sharing and crap.. You can just

Re: [algogeeks] Re: Spoj ABCPATH

2012-02-05 Thread saurabh singh
http://www.spoj.pl/problems/ABCPATH/ Saurabh Singh B.Tech (Computer Science) MNNIT blog:geekinessthecoolway.blogspot.com On Sun, Feb 5, 2012 at 11:18 PM, WgpShashank shashank7andr...@gmail.comwrote: @trinity tell the link of problem ? *Thanks Shashank Mani Narayan Computer Science

[algogeeks] openmp

2012-02-05 Thread Arun Vishwanathan
hi , i am trying to run this small code with open mp but I dont see any threads created . The code compiles with -fopenmp but does not create threads to run parallel.For example, main() { omp_set_num_threads(4); #pragma omp parallel printf( hello world from %d\n ,omp_get_thread_num());

[algogeeks] Re: spell check

2012-02-05 Thread WgpShashank
@ravi .. why don't try with TRIE -- *Thanks Shashank Mani Narayan Computer Science Engineering Birla Institute of Technology,Mesra ** Founder Cracking The Code Lab http://shashank7s.blogspot.com/* -- You received this message because you are subscribed to the Google Groups Algorithm

Re: [algogeeks] openmp

2012-02-05 Thread Rahul
which compiler or which environment I use Microsoft Visual Studio with Microsoft HPC Pack A syntax error is visible use { On 2/6/12, Arun Vishwanathan aaron.nar...@gmail.com wrote: hi , i am trying to run this small code with open mp but I dont see any threads created . The code compiles with

Re: [algogeeks] openmp

2012-02-05 Thread Arun Vishwanathan
I use g++ On Sun, Feb 5, 2012 at 12:39 PM, Rahul raikra...@gmail.com wrote: which compiler or which environment I use Microsoft Visual Studio with Microsoft HPC Pack A syntax error is visible use { On 2/6/12, Arun Vishwanathan aaron.nar...@gmail.com wrote: hi , i am trying to run this

Re: [algogeeks] openmp

2012-02-05 Thread Rahul
See a hello world tutorial as far as I can see is that you haven't put {} in the section of code you want to run parallel how many processors do you have try running without asking number of threads .you must see as many outputs as number of processors On 2/6/12, Arun Vishwanathan

Re: [algogeeks] openmp

2012-02-05 Thread Arun Vishwanathan
hey , I just figured out the problem. the -fopenmp was to be included in a couple of places in my makefile due to which the openmp library was not getting recognised though code was compiling. Anyways if it is just one line of code and u dont need the braces after omp parallel( it is just like a

[algogeeks] Re: doubt about macro.......

2012-02-05 Thread Dave
@Sharad: Wouldn't it expand into int t; t=t;t=u;u=t with unexpected results? Also, won't swap(i,j,int) swap(x,y,double) cause trouble? It will expand into int t; t=i; i=j; j=t; double t; t=x; x=y; y=t; which gives conflicting types for t. But there is a way to fix this, isn't there? Dave

Re: [algogeeks] Re: In a char string, find min distance between 2 letters, O(n) time, O(1) space.

2012-02-05 Thread Harshal
Initialize i = index of first 'a' j = index of first 'b' n = array length. MinDist = n+1; while(i n j n){ MinDist = min(MinDist, abs(i-j)) if(i j) i = index of next 'a' else j = index of next 'b' } -- Best Regards, Harshal Choudhary. -- You received this message because you

Re: [algogeeks] Re: spell check

2012-02-05 Thread atul anand
@*Shashank : *i guess using TRIE for spell check is not a good option because 1) dictionary is too large , it would take lot of time for creating trie for all word in the dictionary. 2) space consumption will be too large . there are algorithmn in which we can optimize space but still it would

Re: [algogeeks] Re: JAVA: Print all paths from root to leaf

2012-02-05 Thread atul anand
@WgpShashank: actually linked list is a good choice if tree height is large.Array may not able to fill 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

Re: [algogeeks] Re: In a char string, find min distance between 2 letters, O(n) time, O(1) space.

2012-02-05 Thread Ashish Goel
This is what i had thought of too, btw, we need to update first in all cases whether the char is same as a previous one or different. int minD(char *pStr, int len, char a, char b) { if ((!pStr)|| (len 2)) return -1; if (a == b) return 0; bool foundA=false; bool foundB=false; int

Re: [algogeeks] Re: In a char string, find min distance between 2 letters, O(n) time, O(1) space.

2012-02-05 Thread WgpShashank
@harsahl that won't work in duplicate case :) @ashish ..my will produce correct result , no need of using extra variable here is main function i am talking about int minDist(char arr[], int n, char x, char y) { int i = 0; int min_dist = INT_MAX; int first; // Find the first

Re: [algogeeks] Re: In a char string, find min distance between 2 letters, O(n) time, O(1) space.

2012-02-05 Thread atul anand
@WgpShashank : for which test case harsahl soln will fail??? On Mon, Feb 6, 2012 at 11:02 AM, WgpShashank shashank7andr...@gmail.comwrote: @harsahl that won't work in duplicate case :) @ashish ..my will produce correct result , no need of using extra variable here is main function i am

[algogeeks] Re: Pairwise Sum Array

2012-02-05 Thread sandipan
Hello Ashish, try with this 2-5-6-8-11 so, if we do this then pair wise sum will be (7-8-10-13) | (11-13-16) | (14 17) | (19) So the last three elements will be (16-17-19) Here, 16 is b+e So,it is not necessary that the last three elements will be exactly 1.c+d 2.c+e 3.d+e -- You received