Re: [algogeeks] Re: Power(n^n)

2012-06-12 Thread hary rathor
there would no problem of rang if K^(1/N)==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

Re: [algogeeks] Re: MS Question : find word in 2D array

2012-06-12 Thread hary rathor
1 search should in using KMP algo so that It can be seacrh in O(n) . let function is int KMP(src,trget, searchDirection ) this kmpSearch funtion should be implemented is such a fashion that is search in both direction. 3. assume that give 2d array name is array const int row =1; const int col

Re: [algogeeks] Re: Can anyone explain this strange behavior ?

2012-06-12 Thread nadeem khan
i=-3 it gets incremented to -2 (++i) m is evaluated and as ++i is non zero it evaluates to TRUE and m is assigned value 1, hence remaining part is not executed , so j and k is not incremented. On Tue, Jun 12, 2012 at 2:19 AM, Dave dave_and_da...@juno.com wrote: This is the result of

RE: [algogeeks] Re: Can anyone explain this strange behavior ?

2012-06-12 Thread Ashot Madatyan
k should be 1 right No, it shouldn't be because the expression evaluation will stop at the very first sub-expression as soon as it evaluates to true in the m=++i || ++j ++k ; And the first sub-expression that evaluates to true is the ++i Rgds, Ashot From: algogeeks@googlegroups.com

[algogeeks] Problem(algo+filesystem): Fetch last K -MB data from data stream

2012-06-12 Thread Praveen
Hi, I need some suggestion in solving one problem. *Statement:* There is a input stream of characters. This will flow for infinite time. Now, the task is to store most recent K mb data in a text file at any time T. *Constraint*: you can not use buffer of size K mb directly because of memory

[algogeeks] Adobe interiew question

2012-06-12 Thread Anika Jain
how can we implement exception handling in c? -- Regards Anika Jain -- 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

Re: [algogeeks] Adobe interiew question

2012-06-12 Thread Abhishek Goswami
we can handle exception handling through macro. http://en.wikibooks.org/wiki/C_Programming/Error_handling On Tue, Jun 12, 2012 at 9:47 PM, Anika Jain anika.jai...@gmail.com wrote: how can we implement exception handling in c? -- Regards Anika Jain -- You received this message because

Re: [algogeeks] Adobe interiew question

2012-06-12 Thread Shashank Narayan
yes u can review that link :) On Tue, Jun 12, 2012 at 9:47 PM, Anika Jain anika.jai...@gmail.com wrote: how can we implement exception handling in c? -- Regards Anika Jain -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to

Re: [algogeeks] [amazon]: dutch national flag algorithm

2012-06-12 Thread Mad Coder
Let array contains 3 types of elements R,G,B. Now, if we place all the R elements from the left and B elements from the right then G elements will automatically be between the two. Thus we only have to keep indexes for the R and B elements inserted till now and update their positions accordingly

[algogeeks] spoj problem

2012-06-12 Thread gaurav yadav
plz nyone explain how to approach this problem.. http://www.spoj.pl/problems/XORROUND/ -- 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

[algogeeks] Re: Permutations of a string

2012-06-12 Thread KK
Thanks Gene :D On Tuesday, 8 May 2012 07:24:01 UTC+5:30, Gene wrote: You just need to make sure that the same character is never swapped to the same position twice. Here is one way to do it. #include stdio.h #include string.h void swap(char *s, int i, int j) { char t = s[i];

Re: [algogeeks] Adobe interiew question

2012-06-12 Thread saurabh singh
tHE first thing that comes in my mind Signals Saurabh Singh B.Tech (Computer Science) MNNIT blog:geekinessthecoolway.blogspot.com On Tue, Jun 12, 2012 at 10:26 PM, Shashank Narayan shashank7andr...@gmail.com wrote: yes u can review that link :) On Tue, Jun 12, 2012 at 9:47 PM, Anika Jain

Re: [algogeeks] Re: Differentiate the following declarations.

2012-06-12 Thread Mad Coder
*const char* a* is *equivalent* to *char const * a* A simple method which most people use in coding is that const is written after the value which needs to be constant. So, *char const *a* means a is a pointer that points to a character which is a constant i.e you can not change the value which a