if the string is sorted.... then
int rmvDup(char arr[],int arrLen)
{
int i,j;
for (i =1,j=0; i< arrLen;i++)
{
if (arr[j] != arr[i])
{
arr[j+1] = arr[i];
j = j+1;
}
}
arr[j]='\0';
return j+1;
}
On Tue, Oct 11, 2011 at 9:18 AM, sunny agrawal <[email protected]>wrote:
> @Ankur
> in Trie at each Node there will be 26 Pointers Stored, and Most of them
> would be NULL, thats why i think it will waste space,
>
> in Balanced Binary Tree i was thinking of storing the Complete Words at a
> Node.
>
> But now i think this is Better -----> Ternary Search
> Tries<http://en.wikipedia.org/wiki/Ternary_search_tries>
>
>
>
>
>
> --
> Sunny Aggrawal
> B.Tech. V year,CSI
> Indian Institute Of Technology,Roorkee
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.