网站开发完后期维护重要吗,49图库下浏览器,广州百度网站搭建,app 门户网站题目 字符串中的第一个唯一字符 字符串中的第一个唯一字符
原题链接#xff1a;字符串中的第一个唯一字符 计数法#xff1a;
class Solution {
public:int firstUniqChar(string s) {int arr[130] {0};for(auto x : s){arr[x-0];}int i 0;for(auto x : s){if(arr[x-0] … 题目 字符串中的第一个唯一字符 字符串中的第一个唯一字符
原题链接字符串中的第一个唯一字符 计数法
class Solution {
public:int firstUniqChar(string s) {int arr[130] {0};for(auto x : s){arr[x-0];}int i 0;for(auto x : s){if(arr[x-0] 1)return i;i;}return -1;}
};