哈希表 java

  給定一個字符串,找到它的第一個不重複的字符,並返回它的索引。如果不存在,則返回 -1。 案例: s = "leetcode" 返回 0. s = "loveleetcode", 返回 2.   public class solu { public int ff(String s){ int[] li=new int[26]; for (int i=0
相關文章
相關標籤/搜索