摘要:
题目描述:Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may assume that th... 阅读全文
摘要:
题目描述:A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 解题思路:循环读取数字,从左向右读取,每次该位字符减去A加上一即为该为数字代表的数值,然后每次循环前将之前的结果乘以26.表示该表示为26进制。代码如下... 阅读全文
摘要:
题目描述:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in th... 阅读全文