摘要:
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
阅读(205)
评论(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
阅读(383)
评论(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
阅读(175)
评论(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
阅读(249)
评论(0)
推荐(0)

浙公网安备 33010602011771号