摘要:
A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents 阅读全文
摘要:
Reverse a singly linked list. Hint: A linked list can be reversed either iteratively or recursively. Could you implement both? 迭代。 递归。 阅读全文
摘要:
Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Example 2: Note: 将数组按照逆序排序后,如果数组元素都是整数, 阅读全文
摘要:
Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Example 2: Note: 求给定字母组成的最长回文串,使用map记录元 阅读全文
摘要:
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 将一串罗马数字转换为整数,首先使用map建立罗马字母与数字的表示法则。然后从右向左遍 阅读全文
摘要:
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 the arr 阅读全文