![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
容器
lyh_xd
一匹正在努力提高算法、编程水平的机器学习马
展开
-
Leetcode 1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution.Example:Given nums = [2, 7, 11, 1原创 2016-09-01 12:52:24 · 237 阅读 · 0 评论 -
Leetcode 349. Intersection of Two Arrays
Given two arrays, write a function to compute their intersection.Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].原创 2016-05-24 15:21:43 · 260 阅读 · 0 评论 -
Leetcode Majority Element I&II
本篇讲述Leetcode里面两个关于找出出现次数最多元素的相似题目,通过多种解法,展现摩尔投票法的魅力。leetcode #169 Majority Element Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2原创 2016-03-27 16:09:29 · 570 阅读 · 0 评论