#include "stdafx.h"
#include <string>
using namespace std;
#include <vector>
#include <map>
class Solution
{
public:
int find_right_char(string str)
{
int strLen = str.size();
if (strLen ==0)
{
return -1;
}
map<char,int> item;
for (size_t i = 0; i < strLen; i++)
{
item[str[i]] = item[str[i]] + 1;
}
for (size_t i = 0; i < strLen; i++)
{
if (item[str[i]] ==1)
{
return str[i];
}
}
return -1;
}
};
int main()
{
Solution aa;
string str = "12312";
aa.find_right_char(str);
return 1;
}