[algogeeks] Re: arc length

2008-01-05 Thread chandra kumar
Hi, By ratio of circumference, I assume L / C (i.e. the ratio of L:C) You mentioned that you know that ratio i.e., you know L / C = k,where k is the ratio of L to C which impliesL = k * C Then by the circumference formula C = 2 * PI * r L = k * 2 * PI * r By any cha

[algogeeks] Re: arc length

2008-01-04 Thread chandra kumar
Hi, I assume radio or circumference as ratio of circumference and take that as L / C = k , where k is the ratio of circumferece and C is the circumference If so then C = 2 * PI * r L = k * C = k * 2 * PI * r But I'm not sure that my assumption is right or i

[algogeeks] Re: NxN matrix

2007-11-27 Thread chandra kumar
for(int l=0;l > > > { > > > > if( array[i][l] != 0 ) array[i][l]=-1; > > > > } > > > > array[i][j] = -1; > > > > } > > } > > > > for(int i=0;i > > > for(int j=0;j > > >

[algogeeks] Re: NxN matrix

2007-11-26 Thread chandra kumar
nt l=0;l > { > >if( array[i][l] != 0 ) array[i][l]=-1; > > } > > array[i][j] = -1; > > } > > } > > for(int i=0;i > for(int j=0;j >if(array[i][j]==-1) > > array[i][j]=0; > > > > *Best Regards,**

[algogeeks] Re: NxN matrix

2007-11-23 Thread chandra kumar
d zero > every row that ends with a zero. > > Finally, if the last element in the last row is zero, zero the last > column. > > This touches every element at most 3 times; i.e., if the array has m > rows and n columns, the algorithm is O(1) in space and O(m*n) in > time.

[algogeeks] Re: NxN matrix

2007-11-23 Thread chandra kumar
ake > corresponding column and row elements 0. " > > Does it mean make all the rows and column zero or only last row and > column elemnt zero?? > could you reframe the problem statement with more details or an > example. > > Thank YOu, > Mayur > > On Nov 23, 1:20

[algogeeks] Re: NxN matrix

2007-11-23 Thread chandra kumar
row and column, right? > 1 1 1 > 0 1 0 > > After second scan: > 0 0 0how did we get these zero, only columns are to be > changed, right? > 0 1 1 > 0 0 0 > > After third scan: > 0 0 0 > 0 1 0 how did we get this as, ast element is ignored, ri

[algogeeks] Re: NxN matrix

2007-11-22 Thread chandra kumar
Hi Dave, Can you explain your algo for these 2 cases... 0 1 11 1 0 1 1 11 1 1 1 1 10 1 1 Please explain me in steps cause we tried the same problem and can't get it done for without using extra space. ( we used 1 extra space, if the

[algogeeks] Re: Summation formules

2007-11-07 Thread chandra kumar
By expanding both log (n!) and n log n log (n!) = log n + log (n-1) + .. + log 2 + log 1, n terms here n log n = log n + log n + .. + log n + log n, and n terms here n log n*>*log (n!), n > 1 n log n=log (n!)

[algogeeks] Re: combinations in lexographic order

2007-10-22 Thread chandra kumar
Will this work? I tried my solution with some test cases. # include void printCombinations( char buffer[], int bI, char string[], int sI, int length ) ; int main( void ) { char str[1024], buf[1024] ; int i, j, length ; scanf( "%s", str ) ; for( length = 0 ; str[length] ; ++leng

[algogeeks] Re: Post order traversal of a binary tree without recursion

2007-09-10 Thread chandra kumar
;s and then the > data in the node. For eg: > > 1 > 2 3 >45 6 7 > > Post order is: 4 5 2 6 7 3 1 > Pre order is: 1 2 4 5 3 6 7 > > So, think if your solution works for the post order. > > Regards > Phani > On 9/9

[algogeeks] Re: Post order traversal of a binary tree without recursion

2007-09-08 Thread chandra kumar
{ push( RightStack, root ) ; root = root->right ; } else root = NULL ; } } } Correct me if I am wrong. Thanks and Regards, K.V.Chandra Kumar. On 09/09/2007, chandra kumar <[EMAIL PROTECTED]> wrote: > &

[algogeeks] Re: Post order traversal of a binary tree without recursion

2007-09-08 Thread chandra kumar
t;left=NULL || stack ! empty) > root=pop() > if(root->left !=NULL) > { > root=root->left > } > >}while( stack ! empty); > > } > > > On Aug 28, 8:39 am, "chandra kumar" <[EMAIL PROTECT

[algogeeks] Re: Post order traversal of a binary tree without recursion

2007-08-27 Thread chandra kumar
Hi, Need more details about explored( Node * ) function, Consider the "NULL" input if your explored( NULL ) returns "true" then I guess that every thing works fine, and also most of your checks could be eliminated ( code will become simpler ) if your explored( NULL ) returns "fal

[algogeeks] Re: Post order traversal of a binary tree without recursion

2007-08-26 Thread chandra kumar
Hi, Consider the case given below, 2 1NULL The post order should be <1, 2> ( ignoring the NULL ). Your algo gives <2> as the result. Pin point me if I'm wrong. Thanks and Regards, K.V.Chandra Kumar. On 24/08/07, Phani Kumar Ch. V. <[EMAIL PROTECTED]>

[algogeeks] Re: Can someone help me on photon mapping algo

2006-01-21 Thread chandra kumar
Sorry but I am coding for this algo. So I need some suggesstion i.e. I need to develop a miniature POVRAY... Thanks On 1/13/06, SPX2 <[EMAIL PROTECTED]> wrote: > > why not use POV-ray ? > >

[algogeeks] Let's share photos

2006-01-12 Thread chandra kumar
chandra wants to share photos with you. Get chandra's latest photos in your email If you can't click on the link above please copy/paste the link below: http://www.ringo.com/i.html?i=131597698x149767&homeEmail=algogeeks%40googlegroups.com&firstName=algogeeks&lastName=&origin=invit

[algogeeks] Can someone help me on photon mapping algo

2005-12-31 Thread chandra kumar
To render some primitive objects better than what ray tracing do I searched and found that photon mapping is better but don't know how to start coding. Can someone help me. Also do anybody have the book "The realistic image synthesis using photon mapping" by Jensen. Please reply to me...

[algogeeks] Re: "Art of Computer Programming" by Knuth

2005-11-11 Thread chandra kumar
I too love to join the group... Please add me...On 10/16/05, Infinity <[EMAIL PROTECTED]> wrote: Hi All,I want to start a new group which consists of people who are willing tosolve the exercise of Knuth's "The Art of Computer Programming". Whoall are interested please tell. This group will be dedic