Raw Code
Aixoum
这个作者很懒,什么都没留下…
展开
-
Bootstrap重采样实战
Bootstrap重采样实践0x00 What is Bootstrap0x01 Why Bootstrap0x02 Show Code0x00 What is Bootstrap首先统计学中的Bootstrap就是一种获得样本的抽样方法。Bootstrap的一般的抽样方式就是“有放回地全抽”。一次性全量获取数据来训练模型或抽样那么我们就只能得到一个模型或一个分布结果。但是多次“有放回地全抽“...原创 2019-06-19 10:23:35 · 4156 阅读 · 1 评论 -
LeetCode 1.Two Sum 两数之和 Python3 五种解法
1. LeetCode Two Sum因为是求索引,肯定会涉及到值和索引的映射。Python暂时想不到好方法,用的tuple。运算的化目前实现了排序,两分。本来自己有写插入排序的,但是不知道怎么用在tuple上只能偷个懒sorted。以及明明可以把数据抽象成 n x n x 2 的矩阵一次性两两求和,哈希暴力匹配,我却抽象不出结构。不过就算这也也是中等水平了。class Solution: ...原创 2019-06-21 00:43:24 · 436 阅读 · 0 评论 -
LeetCode 2.Add Two Numbers 两数相加 Python3 三种解法
LeetCode 2.Add Two Numbers 两数相加 Python3由于做提前连链表是怎么实现的都不知道所以补了点课。Single Linked List 代码来自这位兄台pasilohttps://blog.51cto.com/13047263/2070815内容理解我看的知乎如何更好的理解链表以下代码和LeetCode上面的链表稍微有些许不同,那个里面链表和链表上面的节...原创 2019-06-22 08:33:56 · 767 阅读 · 0 评论 -
LeetCode 3.Longest Substring Without Repeating Characters 无重复字符的最长子串 Python3 三种解法
LeetCode 3.Longest Substring Without Repeating Characters 无重复字符的最长子串 Python3 三种解法LeetCode 3.Longest Substring Without Repeating Characters 无重复字符的最长子串 Python3 两种解法暴力匹配滑动窗方法一滑动窗方法二无重复字符的最长子串 Python3...原创 2019-06-22 22:16:04 · 189 阅读 · 0 评论 -
LeetCode 6.ZigZag Conversion Z 字形变换
LeetCode 6.ZigZag Conversion Z 字形变换暂时先自己实践了一个后补官方思路分析class Solution: def convert(self, s, numRows): new_s = "" if numRows >= len(s) or numRows < 2: new_s = s ...原创 2019-06-26 14:56:48 · 124 阅读 · 0 评论 -
LeetCode 4.Median of Two Sorted Arrays 寻找两个有序数组的中位数详解
LeetCode 4.Median of Two Sorted Arrays 寻找两个有序数组的中位数 Python3审题二分查找代码算法复杂度解释https://leetcode.com/problems/median-of-two-sorted-arrays/鉴于这道题本事有明确的时间复杂度要求,并且题面原始的输入结构又是两个List,最好不要贪图省事直接合并两个List为一个List...原创 2019-06-23 16:30:51 · 181 阅读 · 0 评论 -
LeetCode 5.Longest Palindromic Substring 最长回文子串 详解
LeetCode 4.Median of Two Sorted Arrays 寻找两个有序数组的中位数 标准答案详解审题二分查找代码算法复杂度解释https://leetcode.com/problems/median-of-two-sorted-arrays/鉴于这道题本事有明确的时间复杂度要求,并且题面原始的输入结构又是两个List,最好不要贪图省事直接合并两个List为一个List,...原创 2019-06-24 16:43:45 · 137 阅读 · 0 评论