Do it


  • Home

  • Tags

  • Archives

Leetcode 26. Remove Duplicates from Sorted Array

Posted on 2019-03-26 |
Words count in article: 135 | Reading time ≈ 1
Question Solution首先需要注意,给定的是排序之后的list。如果cur_name 与num不相同,则不发生变化,指针向后移动。如果cur_name 与num相同,直接跳过判断,但是当下一次不相同的时候,会将这个num复制到list的idx的位置。从而将list中的所有不同元素都集中到 ...
Read more »

Leetcode 1/167. Two Sum

Posted on 2019-03-26 |
Words count in article: 206 | Reading time ≈ 1
Question1 Solution1首先,题目要求同一个数据不能使用两次,并且只有一个解。所以考虑将第i个元素和其后面的所有元素遍历求和,如果没有发现,则i+1。 12345678910class Solution: def twoSum(self, nums: 'List[int]', t ...
Read more »

感知机-Perceptron

Posted on 2019-03-26 |
Words count in article: 1.1k | Reading time ≈ 5
感知机的直观感受感知机是机器学习中的最基本也是最简单的一个算法。下图就是一个例子。 例如,我们有一个二维数据,横轴为$X_1$, 纵轴为$X_2$。图中有黄蓝红三条直线,都可以将两簇数据完美划分。其实,这三条直线就是感知机的分割线。如果数据是n维的,那就是分离超平面了。 并且我们需要注意到,感知机 ...
Read more »

Hi

Posted on 2019-03-25 |
Words count in article: 18 | Reading time ≈ 1
2019, 加油!! 然后和我家小宝贝一直一直走下去!!
Read more »
1…67
JW

JW

64 posts
14 tags
GitHub E-Mail
0%
© 2019 JW
Powered by Hexo
|
Theme — NexT.Pisces v5.1.4
访客数 人 总访问量 次