and also if it's not alphabetic .. you can make an array of 255 ( all ASCII code ) , and it'll work also ..
On Aug 8, 11:12 pm, "chitta koushik" <[EMAIL PROTECTED]> wrote: > Hi, > > If the string contains only alphabets then we can maintain an array of > 26 characters which tells that the alphabets has occured once or > not....if it is already occured .....we can output it directly... > > more efficient algos are welcome > > On 8/8/07, JOE11790 <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > I got a question in the interview about how to find the first non > > repeating char in a string. For example for string ABCA, B is the > > first non repeating char. It is easy to come up with a brute > > force algorithm by scanning the string. But is there an efficient way > > to do it? > > > thanks > > -- > *************************************************************** > 30 years from now it doesn't matter which shoe you wore,which branded > jean you wore..what all matters is WHAT YOU HAVE LEARNED AND HOW YOU > HAVE USED IT. > > http://students.iiit.ac.in/~koushik_c --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
