@karthick:
as per u'r code... for ex: total is i/p---o/p will be 'l' not 'o' since 'l'
comes before to 'o' ...

On Thu, Sep 15, 2011 at 10:55 PM, kartik sachan <kartik.sac...@gmail.com>wrote:

> soluntion for 1ST question is :http://ideone.com/LSOj6
>
> # include<cstdio># include<cstring>char checknonrepeat(char *a,int *b,int n){
>         int i;
>         for(i=0;i<n;i++)
>         {
>                 if(b[a[i]]==1)
>                 break;
>         }return a[i];}int main(){
>         int  b[300]={0};
>         char a[]="teeter";
>         int n=strlen(a);
>         int i;
>         for(i=0;i<n;i++)
>         b[a[i]]++;
>         printf("NON REPEATED CHAR=%c\n",checknonrepeat(a,b,n));
>         return 0;}
>
>
> complex O(lenght of string)
>
> plz correct me if i am wrong..........
>
>
>  --
> 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.
>



-- 

**Please do not print this e-mail until urgent requirement. Go Green!!
Save Papers <=> Save Trees
*BharatKumar Bagana*
**http://www.google.com/profiles/bagana.bharatkumar<http://www.google.com/profiles/bagana.bharatkumar>
*
Mobile +91 8056127652*
<bagana.bharatku...@gmail.com>

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