@Sukran

I guess it will return repeating character in alphabetical order but not in
order of appearance in the i/p ??

On Wed, Sep 28, 2011 at 8:04 PM, sukran dhawan <sukrandha...@gmail.com>wrote:

> int RepChar(char *str)
> {
>     int i,j;
>     int ret = -1;
>     int count[25];
>
>     for (i=0;i<25;++i) {
>         count[i]=0;
>     }
>     for (i=0;str[i];++i) {
>         j=str[i] - 'a';
>         count[j]++;
>     }
>     for (i=0;i<25;i++) {
>         if (count[i]==1) {
>             return ('a'+i);
>         }
>     }
> return ret;
>
> }
>
> On Wed, Sep 28, 2011 at 7:57 PM, shady <sinv...@gmail.com> wrote:
>
>> i will mail the code by tomorrow.
>>
>>
>> On Wed, Sep 28, 2011 at 6:54 PM, Avenged <nitee...@gmail.com> wrote:
>>
>>> Bump. Anybody?
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msg/algogeeks/-/on-DbSKUdzsJ.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> 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 algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> 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 algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> 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 algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to