摘要:
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
摘要:
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This 阅读全文
摘要:
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: 分析:找出字符串中第一次出现且不重复的字符,返回 阅读全文