#include <iostream>
#include <limits>
#include <bitset>
 
int main()
{
    constexpr char cstr[] = "introduction";
 
    std::bitset< std::numeric_limits<unsigned char>::max() + 1 > present ;
    std::bitset< std::numeric_limits<unsigned char>::max() + 1 > repeating ;
    for( unsigned char u : cstr )
    {
        repeating[u] = present[u] ;
        present[u] = true ;
    }
 
    for( unsigned char u : cstr ) if( present[u] && !repeating[u] && u != 0 )
    {
        std::cout << "first non-repeating char is '" << char(u) << "'\n" ;
        break ;
    }
}
 