摘要:
Problem: Reverse a singly linked list. A linked list can be reversed either iteratively or recursively. Could you implement both? Summary: 翻转链表。 Analy 阅读全文
posted @ 2016-10-30 23:07
SillyVicky
阅读(192)
评论(0)
推荐(0)
摘要:
Problem: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. Summary: 将罗马数字转换为十进制阿拉伯数字。 Analys 阅读全文
posted @ 2016-10-30 12:14
SillyVicky
阅读(327)
评论(0)
推荐(0)
摘要:
Problem: Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Each elemen 阅读全文
posted @ 2016-10-30 11:51
SillyVicky
阅读(203)
评论(0)
推荐(0)
摘要:
Problem: Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Each ele 阅读全文
posted @ 2016-10-30 11:49
SillyVicky
阅读(382)
评论(0)
推荐(0)
摘要:
Problem: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice i 阅读全文
posted @ 2016-10-30 01:25
SillyVicky
阅读(173)
评论(0)
推荐(0)
摘要:
Problem: 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 阅读全文
posted @ 2016-10-30 01:12
SillyVicky
阅读(247)
评论(0)
推荐(0)

浙公网安备 33010602011771号