[algogeeks] Re: Good string problem

2007-12-24 Thread k3xji
In The printStr function determine if the string contains s as a substring. I said in the below of the code.Look at the comment above. On Dec 19, 9:16 am, John <[EMAIL PROTECTED]> wrote: > Where arr u checking whether s is there or not ? > > On Dec 18, 7:38 pm, k3xji <[EMAIL

[algogeeks] Re: Good string problem

2007-12-18 Thread k3xji
Given a permute array you want to create fixed set of elements in which s does not occur. Modify the below function: void permuteStr(char *out, char *permuteArr, unsigned char outSize, unsigned int permuteArrSize, int index, void (*outStr)(char *)) { if (index == outSize

[algogeeks] Re: Sorting o(n) time

2007-03-19 Thread k3xji
Hi all, Quoted from Wikipedia: >Pigeonhole sorting, also known as count sort, is a sorting algorithm that >takes linear time (Θ(n)), which is the best possible performance for a sorting >algorithm since >one must inevitably look at each of the elements being sorted >at least once, regardless o

[algogeeks] Binary Tree Depth()

2007-02-28 Thread k3xji
Hi, Is there any way of calculating the depth of a binary tree without using *recursive way*.Also not using *log2-1* method.I am asking this because Is there any way of doing this kind of operation with just using stacks or quenes.In other words, is there a some kind of compiler optimization just