In ký tự không lặp lại đầu tiên trong một chuỗi trong C++

Cho một chuỗi, tìm ký tự không lặp lại đầu tiên trong đó. Ví dụ: nếu chuỗi đầu vào là "GeeksforGeeks", thì đầu ra phải là 'f' và nếu chuỗi đầu vào là "GeeksQuiz", thì đầu ra phải là 'G'

Show


    In ký tự không lặp lại đầu tiên trong một chuỗi trong C++

    Chúng ta có thể sử dụng các ký tự chuỗi làm chỉ mục và xây dựng một mảng đếm. Sau đây là thuật toán

    1) Scan the string from left to right and construct the count array.
    2) Again, scan the string from left to right and check for count of each
     character, if you find an element who's count is 1, return it.
    


    Thí dụ

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    

    Thực hiện

    C/C++

    // C program to find first non-repeating character

    #include

    #include

    #define NO_OF_CHARS 256

     

    /* Returns an array of size 256 containg count

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    1

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    5

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    9
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    First non-repeating character is f
    1
    First non-repeating character is f
    2
    First non-repeating character is f
    3
    First non-repeating character is f
    4
    First non-repeating character is f
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    First non-repeating character is f
    7

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    First non-repeating character is f
    0

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    First non-repeating character is f
    2
    First non-repeating character is f
    3

    First non-repeating character is f
    4
    First non-repeating character is f
    5

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    First non-repeating character is f
    7
    First non-repeating character is f
    8

    First non-repeating character is f
    9

     

    // C program to find first non-repeating character1

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0// C program to find first non-repeating character3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0// C program to find first non-repeating character5

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 // C program to find first non-repeating character7
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    5

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include1

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 #include3

    #include1

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 #include6

     

    #include1

    First non-repeating character is f
    2
    First non-repeating character is f
    3

    #include1_______1_______6

    #include3____765_______4 #include5

    #include3____1_______6

    First non-repeating character is f
    4#include9

    First non-repeating character is f
    4#define NO_OF_CHARS 2561#define NO_OF_CHARS 2562

    #include3#define NO_OF_CHARS 2564

    #include1____766_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0

    #include1#define NO_OF_CHARS 2569 0 1

    #include1____13_______7  4

    First non-repeating character is f
    9

     

     7

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2  9

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include1

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4 /* Returns an array of size 256 containg count3/* Returns an array of size 256 containg count4#define NO_OF_CHARS 2562

    #include1

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 /* Returns an array of size 256 containg count8

    #include1____765_______4

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    01

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    03
    First non-repeating character is f
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    05
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    06

    #include1_______1_______08

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    03
    First non-repeating character is f
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    12
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    13

    #include1_______1_______15

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    16

    #include1____13_______7

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    19

    First non-repeating character is f
    9

    Java

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    21

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    23
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    24

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    28
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    30
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    31#define NO_OF_CHARS 2562

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    36
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    37
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    39

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    42

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    43
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    44

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40_______1_______27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    47
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    48

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40_______1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    51
    First non-repeating character is f
    2
    First non-repeating character is f
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    55
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    56
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    57

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    58
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    59

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40_______13_______9

    First non-repeating character is f
    4

    #include3_______1_______64

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    43// C program to find first non-repeating character3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    43// C program to find first non-repeating character5

    #include3____1_______27

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    72

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    76

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    79
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    80_______1_______81

    First non-repeating character is f
    4

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    85
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    56
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    57

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90#include4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    92
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    80
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    94

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    97#include9

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    97#define NO_OF_CHARS 2561#define NO_OF_CHARS 2562

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90#define NO_OF_CHARS 2564

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75#define NO_OF_CHARS 2566

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    43

    First non-repeating character is f
    4
    First non-repeating character is f
    7  4

    #include3

    First non-repeating character is f
    9

     

    #include3

    First non-repeating character is f
    14

    #include3

    First non-repeating character is f
    16
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    47
    First non-repeating character is f
    19

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    23/* Returns an array of size 256 containg count4#define NO_OF_CHARS 2562

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 /* Returns an array of size 256 containg count8

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    51

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    31
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    80
    First non-repeating character is f
    33
    First non-repeating character is f
    34
    First non-repeating character is f
    35

    First non-repeating character is f
    36_______13_______37
    First non-repeating character is f
    38
    First non-repeating character is f
    39
    First non-repeating character is f
    40

    #include3

    First non-repeating character is f
    9

    First non-repeating character is f
    9

    con trăn

    First non-repeating character is f
    44

    First non-repeating character is f
    45_______13_______46
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    31

     

    First non-repeating character is f
    49

    First non-repeating character is f
    50

    First non-repeating character is f
    51
    First non-repeating character is f
    52

    #include3

    First non-repeating character is f
    54
    First non-repeating character is f
    46
    First non-repeating character is f
    56
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    56
    First non-repeating character is f
    58
    First non-repeating character is f
    59
    First non-repeating character is f
    45

    #include3

    First non-repeating character is f
    2
    First non-repeating character is f
    63
    First non-repeating character is f
    64
    First non-repeating character is f
    65

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    67
    First non-repeating character is f
    68
    First non-repeating character is f
    69
    First non-repeating character is f
    35
    First non-repeating character is f
    46
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    80

    #include3

    First non-repeating character is f
    7
    First non-repeating character is f
    54

     

    First non-repeating character is f
    77

    First non-repeating character is f
    78

    First non-repeating character is f
    79

    First non-repeating character is f
    51
    First non-repeating character is f
    81

    #include3

    First non-repeating character is f
    54
    First non-repeating character is f
    46
    First non-repeating character is f
    85

    #include3

    First non-repeating character is f
    87
    First non-repeating character is f
    46
    First non-repeating character is f
    89
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    80

    #include3

    First non-repeating character is f
    92
    First non-repeating character is f
    46
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    56

     

    #include3

    First non-repeating character is f
    2
    First non-repeating character is f
    63
    First non-repeating character is f
    64
    First non-repeating character is f
    65

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75#include4
    First non-repeating character is f
    67_______13_______68
    First non-repeating character is f
    69
    First non-repeating character is f
    46
    First non-repeating character is f
    46
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    80
    First non-repeating character is f
    38

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    First non-repeating character is f
    87
    First non-repeating character is f
    46
    First non-repeating character is f
    92

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90#define NO_OF_CHARS 2561

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    92
    First non-repeating character is f
    35
    First non-repeating character is f
    46
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    80

     

    #include3

    First non-repeating character is f
    7
    First non-repeating character is f
    87

     

    First non-repeating character is f
    26

    First non-repeating character is f
    27_______13_______46 /* Returns an array of size 256 containg count4

    First non-repeating character is f
    87
    First non-repeating character is f
    46
    First non-repeating character is f
    32

    #include4

    First non-repeating character is f
    87
    First non-repeating character is f
    46
    First non-repeating character is f
    46
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    80
    First non-repeating character is f
    38

    #include3____13_______40

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    05

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    08
    First non-repeating character is f
    38

    #include3

    First non-repeating character is f
    40
    First non-repeating character is f
    39
    First non-repeating character is f
    35
    First non-repeating character is f
    48

     

    First non-repeating character is f
    50

    C#

    First non-repeating character is f
    51

    First non-repeating character is f
    52
    First non-repeating character is f
    53

    First non-repeating character is f
    52
    First non-repeating character is f
    55

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    23
    First non-repeating character is f
    58

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40

    #include3____1_______27

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    First non-repeating character is f
    63

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4
    First non-repeating character is f
    67
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    37
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    39

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    42

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    44

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    47
    First non-repeating character is f
    79_______13_______27
    First non-repeating character is f
    81

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    2
    First non-repeating character is f
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    First non-repeating character is f
    88

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    First non-repeating character is f
    90

    #include3

    First non-repeating character is f
    9

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40

    #include3_______1_______64

    #include3

    First non-repeating character is f
    97

    #include3____13_______99

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 // C program to find first non-repeating character7
    First non-repeating character is f
    27 // C program to find first non-repeating character05

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    76

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 #include6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    2 // C program to find first non-repeating character16

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90#include4 // C program to find first non-repeating character21

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    97#include9

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    97#define NO_OF_CHARS 2561#define NO_OF_CHARS 2562

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90// C program to find first non-repeating character30

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75// C program to find first non-repeating character30

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    51

    #include3

    First non-repeating character is f
    7  4

    #include3

    First non-repeating character is f
    9

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40

    #include3// C program to find first non-repeating character41

    #include3

    First non-repeating character is f
    16
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    47 // C program to find first non-repeating character46

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    27 // C program to find first non-repeating character51/* Returns an array of size 256 containg count4#define NO_OF_CHARS 2562

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 // C program to find first non-repeating character56

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    51

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75// C program to find first non-repeating character59// C program to find first non-repeating character60
    First non-repeating character is f
    35

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75// C program to find first non-repeating character63
    First non-repeating character is f
    35

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    37
    First non-repeating character is f
    38// C program to find first non-repeating character68

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    35// C program to find first non-repeating character71 // C program to find first non-repeating character72

    #include3

    First non-repeating character is f
    9

    First non-repeating character is f
    9

     

    // C program to find first non-repeating character77

    PHP

    // C program to find first non-repeating character78

    // C program to find first non-repeating character79

    // C program to find first non-repeating character80

    // C program to find first non-repeating character81

    // C program to find first non-repeating character82 // C program to find first non-repeating character83

    // C program to find first non-repeating character84____13_______46____763_______86// C program to find first non-repeating character87

     

    // C program to find first non-repeating character89

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0// C program to find first non-repeating character91

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0// C program to find first non-repeating character93

    // C program to find first non-repeating character94

    First non-repeating character is f
    79// C program to find first non-repeating character96// C program to find first non-repeating character97

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include3#include00 // C program to find first non-repeating character84#define NO_OF_CHARS 2562

    #include3

    First non-repeating character is f
    2
    First non-repeating character is f
    3#include06 #include07

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    51#include06 #include10#include11
    First non-repeating character is f
    3// C program to find first non-repeating character96
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    06_______764_______06#include16

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75// C program to find first non-repeating character84#include19// C program to find first non-repeating character96
    First non-repeating character is f
    56#include06#include23

    First non-repeating character is f
    9

     

    #include26

    #include27

    #include28

    #include29

    // C program to find first non-repeating character5

    // C program to find first non-repeating character94 // C program to find first non-repeating character7// C program to find first non-repeating character96

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    94

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include3#include00 // C program to find first non-repeating character84#define NO_OF_CHARS 2562

    #include3

    First non-repeating character is f
    79// C program to find first non-repeating character96
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    06

    #include3____764_______45 #include46

    #include3

    First non-repeating character is f
    2
    First non-repeating character is f
    3#include06 #include07

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    51#include06 #include10#include11
    First non-repeating character is f
    3// C program to find first non-repeating character96
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    06_______764_______06#include16

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75#include4
    First non-repeating character is f
    3// C program to find first non-repeating character84#include19// C program to find first non-repeating character96
    First non-repeating character is f
    56#include06#include71

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90#include45
    First non-repeating character is f
    46#include06#define NO_OF_CHARS 2562

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90#define NO_OF_CHARS 2561#define NO_OF_CHARS 2562

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75// C program to find first non-repeating character30

    #include3____763_______30

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40

    First non-repeating character is f
    7 #include45#define NO_OF_CHARS 2562

    First non-repeating character is f
    9

     

    // C program to find first non-repeating character41

    // C program to find first non-repeating character96

    First non-repeating character is f
    46/* Returns an array of size 256 containg count4#define NO_OF_CHARS 2562

    #include45 #include98// C program to find first non-repeating character96

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    06

    #include4

    First non-repeating character is f
    3#include45 #include04

    #include05 #include06 #include07

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40_______765_______09#define NO_OF_CHARS 2562

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    08

    #include05 #include13#include07

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90#include16#include17

    #include18// C program to find first non-repeating character96

    First non-repeating character is f
    56#include45#include22

     

    #include24

    #include25


    đầu ra.
    First non-repeating character is f

    Chúng ta có thể làm điều đó bằng cách duyệt qua chuỗi chỉ một lần không?
    Cách tiếp cận trên mất O(n) thời gian, nhưng trong thực tế, nó có thể được cải thiện. Phần đầu tiên của thuật toán chạy qua chuỗi để xây dựng mảng đếm (trong thời gian O(n)). Điều này là hợp lý. Nhưng phần thứ hai về việc chạy lại chuỗi chỉ để tìm bộ không lặp lại đầu tiên là không tốt trong thực tế. Trong các tình huống thực tế, chuỗi của bạn sẽ lớn hơn nhiều so với bảng chữ cái của bạn. Lấy trình tự DNA chẳng hạn. chúng có thể dài hàng triệu chữ cái với bảng chữ cái chỉ có 4 chữ cái. Điều gì xảy ra nếu bộ lặp không ở cuối chuỗi?
    Chúng ta có thể tăng mảng đếm bằng cách lưu trữ không chỉ số đếm mà còn cả chỉ số của lần đầu tiên bạn gặp ký tự e. g. (3, 26) cho 'a' có nghĩa là 'a' được đếm 3 lần và lần đầu tiên nó được nhìn thấy là ở vị trí 26. Vì vậy, khi cần tìm phần tử không lặp lại đầu tiên, chúng ta chỉ cần quét mảng đếm, thay vì chuỗi. Cảm ơn Ben đã đề xuất phương pháp này

    Sau đây là triển khai phương pháp mở rộng chỉ duyệt qua chuỗi đầu vào một lần

    C++

    #include26

    // C program to find first non-repeating character81

    #include28

    First non-repeating character is f
    52 #include30 #include31

    #define NO_OF_CHARS 256

     

    #include34

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0#include36

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0#include38

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0#include40

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 // C program to find first non-repeating character7
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    5

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include3#include47

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2#include49
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2#include51

     

    #include3

    First non-repeating character is f
    2
    First non-repeating character is f
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 #include57

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75#include61

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75#include63

    #include3

    First non-repeating character is f
    9

     

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 #include69

    #include3

    First non-repeating character is f
    2
    First non-repeating character is f
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 #include74

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75#include77

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75#include79

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75#include81

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75#include83

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75#include4 #include86

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90#include88

     

    #include3

    First non-repeating character is f
    7 #include92

    First non-repeating character is f
    9

     

     7

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2  9

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4 /* Returns an array of size 256 containg count3/* Returns an array of size 256 containg count4#define NO_OF_CHARS 2562

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 // C program to find first non-repeating character56

    #include3____765_______4 #define NO_OF_CHARS 25609

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    03
    First non-repeating character is f
    3#define NO_OF_CHARS 25613

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    58#define NO_OF_CHARS 25615
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    06

    #include3_______1_______08

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    03
    First non-repeating character is f
    3// C program to find first non-repeating character68

    #include18#define NO_OF_CHARS 25624

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    13

    #include3____13_______7

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    19

    First non-repeating character is f
    9

    C

    #define NO_OF_CHARS 25630

    #define NO_OF_CHARS 25631

    #define NO_OF_CHARS 25632

    #define NO_OF_CHARS 256

     

    #define NO_OF_CHARS 25635

    #define NO_OF_CHARS 25636

    #define NO_OF_CHARS 25637 #define NO_OF_CHARS 25638

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    First non-repeating character is f
    8

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2  4

    #define NO_OF_CHARS 25645

     

    #define NO_OF_CHARS 25647

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0#define NO_OF_CHARS 25649

    #define NO_OF_CHARS 25637 #define NO_OF_CHARS 25651

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    5

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0#define NO_OF_CHARS 25637 #define NO_OF_CHARS 25657

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    3#define NO_OF_CHARS 25637 #define NO_OF_CHARS 25661
    First non-repeating character is f
    2
    First non-repeating character is f
    3
    First non-repeating character is f
    4#define NO_OF_CHARS 25665

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    First non-repeating character is f
    0

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    First non-repeating character is f
    2
    First non-repeating character is f
    3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    First non-repeating character is f
    4#define NO_OF_CHARS 25675

     

    First non-repeating character is f
    4#define NO_OF_CHARS 25678

    First non-repeating character is f
    4#include4 #define NO_OF_CHARS 25681

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    51#define NO_OF_CHARS 25683

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    First non-repeating character is f
    9

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    First non-repeating character is f
    7
    First non-repeating character is f
    8

    First non-repeating character is f
    9

     

    #define NO_OF_CHARS 25691

    #include3____766_______93

    #include3____766_______95

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 // C program to find first non-repeating character7
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    5

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include1#define NO_OF_CHARS 25637  03

    #include1

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2  06

     

    #include1

    First non-repeating character is f
    2  10

    #include1_______1_______6

    #include3 14

    #include3 16

    #include3____765_______4  19

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    43 21

    #include1

    First non-repeating character is f
    9

     

    #include1#define NO_OF_CHARS 2569 0 1

    #include1

    First non-repeating character is f
    7  31

    First non-repeating character is f
    9

     

     7

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2  9

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include1

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4 /* Returns an array of size 256 containg count3/* Returns an array of size 256 containg count4#define NO_OF_CHARS 2562

    #include1

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 /* Returns an array of size 256 containg count8

    #include1#include4 #define NO_OF_CHARS 25609

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    03
    First non-repeating character is f
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    05
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    06

    #include1_______1_______08

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    0
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    03
    First non-repeating character is f
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    12
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    13

    #include1_______1_______15

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    16

    #include1____13_______7

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    19

    First non-repeating character is f
    9

    Java

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    21

     69

     

     71  72

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    23  75

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2  79

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40

    #include3 82

    #include3

    First non-repeating character is f
    16  85
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2  87

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75 89 90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    80#define NO_OF_CHARS 2562

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75_______767_______89 95

    #include3

    First non-repeating character is f
    9

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40

    #include3____768_______00

    #include3

    First non-repeating character is f
    16
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    47 /* Returns an array of size 256 containg count04

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75 89/* Returns an array of size 256 containg count07

    #include3

    First non-repeating character is f
    9

    First non-repeating character is f
    9

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    23
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    24

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    28
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    30
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    31#define NO_OF_CHARS 2562

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27 /* Returns an array of size 256 containg count24
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    37 /* Returns an array of size 256 containg count26

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    42

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    43
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    44

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40_______1_______27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    47
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    48

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40_______1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    51
    First non-repeating character is f
    2
    First non-repeating character is f
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    55
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    56
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    57

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    51
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90/* Returns an array of size 256 containg count48

    /* Returns an array of size 256 containg count49____765_______4/* Returns an array of size 256 containg count51

    /* Returns an array of size 256 containg count49____1_______6

    /* Returns an array of size 256 containg count54/* Returns an array of size 256 containg count55

    /* Returns an array of size 256 containg count54/* Returns an array of size 256 containg count57

    /* Returns an array of size 256 containg count49____13_______9

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    58

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90/* Returns an array of size 256 containg count62

    /* Returns an array of size 256 containg count49____1_______08

    /* Returns an array of size 256 containg count49____1_______6

    /* Returns an array of size 256 containg count54____768_______68

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    37 /* Returns an array of size 256 containg count70

    /* Returns an array of size 256 containg count49____13_______9

    /* Returns an array of size 256 containg count73

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    51/* Returns an array of size 256 containg count75

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    40_______13_______9

    First non-repeating character is f
    4

    #include3_______1_______64

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    43// C program to find first non-repeating character3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    43// C program to find first non-repeating character5

    #include3____1_______27

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    72

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    76

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 /* Returns an array of size 256 containg count95

    First non-repeating character is f
    4

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    85
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    56
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    57

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    /* Returns an array of size 256 containg count49 14

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90 16

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90#include4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    010
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    80
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    012

    /* Returns an array of size 256 containg count54

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    014

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    First non-repeating character is f
    9

    #include18

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75#define NO_OF_CHARS 2566

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    43

    First non-repeating character is f
    4
    First non-repeating character is f
    7  31

    #include3

    First non-repeating character is f
    9

     

    #include3

    First non-repeating character is f
    14

    #include3

    First non-repeating character is f
    16
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    47
    First non-repeating character is f
    19

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    23/* Returns an array of size 256 containg count4#define NO_OF_CHARS 2562

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 /* Returns an array of size 256 containg count8

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    51

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    045
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    046
    First non-repeating character is f
    35

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    58
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    049
    First non-repeating character is f
    38
    First non-repeating character is f
    39
    First non-repeating character is f
    40

    #include3

    First non-repeating character is f
    9

    First non-repeating character is f
    9

    C#

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    056

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    057

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    058

    First non-repeating character is f
    52
    First non-repeating character is f
    53

    First non-repeating character is f
    52
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    062

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    23  75

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include3

    First non-repeating character is f
    16
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    070

     

    #include3_______1_______073

    #include3

    First non-repeating character is f
    16  85
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    078

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75 89
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    083

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75_______767_______89 95

    #include3

    First non-repeating character is f
    9

     

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    091

    #include3

    First non-repeating character is f
    16
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    094
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    47
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    096

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75 89/* Returns an array of size 256 containg count07

    #include3

    First non-repeating character is f
    9

    First non-repeating character is f
    9

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    23
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    107

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    #include3

    First non-repeating character is f
    16
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    111
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    First non-repeating character is f
    63

     

    #include3

    First non-repeating character is f
    16
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    118_______1_______4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    120

    /* Returns an array of size 256 containg count73

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    122_______1_______37
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    118
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    4#include49

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    127____1_______128

     

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    42

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    44

    #include3

    First non-repeating character is f
    16
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    47
    First non-repeating character is f
    79
    First non-repeating character is f
    27 // C program to find first non-repeating character05

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    2
    First non-repeating character is f
    3
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    First non-repeating character is f
    88

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90/* Returns an array of size 256 containg count48

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90#include4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    154

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    97
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    158

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    97
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    160

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    First non-repeating character is f
    9

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    165

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    167

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    08

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    97
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    173
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    37
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    175

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    First non-repeating character is f
    9

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    9

    #include3

    First non-repeating character is f
    9

     

    #include3_______1_______185

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    187

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    189

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    191

    #include3

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    193
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 // C program to find first non-repeating character7
    First non-repeating character is f
    27 // C program to find first non-repeating character05

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    76

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    205
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2_______1_______207

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    2 // C program to find first non-repeating character16

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    215

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    217

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    219

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90#include4
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    222

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    97
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    224

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    97
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    228

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    90
    First non-repeating character is f
    9

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    9

     

    #include3

    First non-repeating character is f
    7  31

    #include3

    First non-repeating character is f
    9

     

    #include3_______1_______242

    #include3

    First non-repeating character is f
    16
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    47
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    247
    First non-repeating character is f
    27
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    249

    #include3____1_______6

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    First non-repeating character is f
    27 // C program to find first non-repeating character51/* Returns an array of size 256 containg count4#define NO_OF_CHARS 2562

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2 // C program to find first non-repeating character56

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    75
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    262
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    2
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    264

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    265
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    046
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    267

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    265
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    049
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    270

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    265
    First non-repeating character is f
    39
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    267

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    274
    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    275

    #include3

    First non-repeating character is f
    9

    First non-repeating character is f
    9

     

    Input string: str = geeksforgeeks
    1: Construct character count array from the input string.
       ....
      count['e'] = 4
      count['f'] = 1
      count['g'] = 2
      count['k'] = 2
      ……
    2: Get the first character who's count is 1 ('f').
    
    
    280


    đầu ra.
    First non-repeating character is f

    vấn đề liên quan. Ký tự không lặp K’th

    Vui lòng viết bình luận nếu bạn thấy bất cứ điều gì không chính xác hoặc bạn muốn chia sẻ thêm thông tin về chủ đề thảo luận ở trên