做玩游戏任务得q币的网站,做seo营销网站,游戏代理怎么赚钱的,企业网站html源码在字符串 s 中找出第一个只出现一次的字符。如果没有#xff0c;返回一个单空格。
示例:
s abaccdeff 返回 b
s 返回
限制#xff1a;
0 s 的长度 50000
代码#xff1a;
class Solution { publi…在字符串 s 中找出第一个只出现一次的字符。如果没有返回一个单空格。
示例:
s abaccdeff 返回 b
s 返回
限制
0 s 的长度 50000
代码
class Solution { public char firstUniqChar(String s) { int arr[] new int[26]; for(int i0;is.length();i) { arr[s.charAt(i)-a]; } for(int i0;is.length();i) { if(arr[s.charAt(i)-a]1) { return s.charAt(i); } } return ; }
}