Given an integer numRows, return the first numRows of Pascal’s triangle. In Pascal’s triangle, each number is the sum of the two numbers directly above it as shown:
前几天做的动态规划题好难呜呜,做道水题找回自信~
状态转移方程 triangle[i][j] …
Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.
思路 这道题假如能看出是一道0-1背包问题的话,就很好解决了。题目说需要划分…
现在,当谈论起 RESTful Web API 的时候,人们总会想到 JSON。但是实际上,JSON 和 RESTful API 没有半毛钱关系,只不过 JSON 恰好是RESTful API 结果的表述格式。也就是说 RESTful API 还可以使用其它的表述格式,例如 xm…
常见的集成学习有Voting、Bagging、Boost和Stacking。
Voting代码
from sklearn.model_selection import train_test_split
from sklearn.datasets import make_moons
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import VotingClassifier
f…
Microsoft Ignite The Tour 是一年一度微软为全球开发者、IT专家、安全专家以及数据专家提供的为期两天,包含众多核心产品的实践性技术培训。2019.12.10-2019.12.11 已经在北京国家会议中心胜利闭幕,我作为一名Speaker 参与了两门课程的分享,…
You have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot be planted in adjacent plots. Given an integer array flowerbed containing 0’s and 1’s, where 0 means empty and 1 means not empty, and an integer n…