随笔分类 -  2015年8月

摘要:想用scikit-learn学机器学习,昨天安装了一下,今天整理出来。有两种方法使用这个包。一、简单粗暴,直接下载winPython,装了就可以用,IDE是自带的Spyder。二、1、首先安装python,配置环境变量等,这个不多说。 2、安装pip: https://bootstrap.pypa... 阅读全文
posted @ 2015-08-09 12:26 zetrov 阅读(333) 评论(0) 推荐(0) 编辑
摘要:Description:Count the number of prime numbers less than a non-negative number,n.传送门:https://leetcode.com/problems/count-primes/尽可能把查找次数缩小,直接用双重for会超时。... 阅读全文
posted @ 2015-08-05 09:54 zetrov 阅读(190) 评论(0) 推荐(0) 编辑
摘要:There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to firs... 阅读全文
posted @ 2015-08-05 09:34 zetrov 阅读(336) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and al... 阅读全文
posted @ 2015-08-05 09:32 zetrov 阅读(319) 评论(0) 推荐(0) 编辑
摘要:Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ... 阅读全文
posted @ 2015-08-03 16:23 zetrov 阅读(143) 评论(0) 推荐(0) 编辑
摘要:Given a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent ... 阅读全文
posted @ 2015-08-03 16:06 zetrov 阅读(462) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl... 阅读全文
posted @ 2015-08-03 16:02 zetrov 阅读(282) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa... 阅读全文
posted @ 2015-08-03 16:00 zetrov 阅读(273) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2... 阅读全文
posted @ 2015-08-03 15:56 zetrov 阅读(324) 评论(0) 推荐(0) 编辑