@ankuj  just want to clarify that in hashing method we require array of
fixed size let say arr[26] , so is it considered as constant space or not?

On Sat, Sep 3, 2011 at 8:02 PM, siddharam suresh <[email protected]>wrote:

> sol already posted please search old thread
> Thank you,
> Sid.
>
>
>
> On Sat, Sep 3, 2011 at 8:01 PM, Ankuj Gupta <[email protected]> wrote:
>
>> If we take our input to be characters a-z ans A-Z then we require
>> fixed space which can be treated as O(1).
>> On Sep 3, 7:10 pm, teja bala <[email protected]> wrote:
>> > this 'll work if u i/p the string in dis manner
>> > aaabbcc(consecutive same)
>> > a3b2c2
>> >
>> > #include<stdio.h>
>> > #include<conio.h>
>> > main()
>> > {
>> > int x=1,i=0;
>> > char a[100];
>> > gets(a);
>> > while(a[i]!='\0')
>> > {
>> >  while(a[i]==a[i+1])
>> >  {
>> >     x++;
>> >     i++;
>> >  }
>> >  printf("%c%d",a[i],x);
>> >  x=1;
>> >  i++;
>> >  }
>> > getchar();
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > }
>>
>> --
>> 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.
>

-- 
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.

Reply via email to