模板
放学小卖部见0
看不到凌晨的星光,又怎能看到成功的希望!
展开
-
爬虫
def get_content(): url = 'https://search.51job.com/list/000000,000000,0000,00,9,99,python,2,1.html?lang=c&postchannel=0000&workyear=99&cotype=99°reefrom=99&jobterm=99&co...原创 2020-03-02 09:34:18 · 109 阅读 · 0 评论 -
机器学习之K-近邻算法
可用于分类、预测等。 import operator; def classfy(inx,dataset,lable,k): datasetsize=dataset.shape[0]; diffmat=tile(inx,(datasize-1))-dataset; sqdiffmat=diffmat**2; sqdistance=sqdiffmat.sum(axis=...原创 2020-01-15 21:02:19 · 136 阅读 · 0 评论 -
无向图的遍历
****1.DFS 2.BFS 3.退出**** 输入你的选择 1 输入图的点数和边数 3 3 输入图的点 1 2 3 依次输入边的两个端点 0 1 0 2 1 2 输入想要遍历的起点 0 广度优先遍历为:1 2 3 输入你的选择 2 输入图的点数和边数 3 3 输入图的点 1 2 3 依次输入边的两个端点 0 1 0 2 1 2 输入想要遍历的起点 1 深度优先遍历为:2 1 3 输入你的...原创 2019-11-21 18:04:26 · 348 阅读 · 0 评论 -
图的深度遍历和广度遍历
#include<algorithm> using namespace std; const int maxsize=100; bool visited[maxsize]; template <class Datatype> class grahf { public: grahf(Datatype a[],int n,int e); ...原创 2019-11-17 20:01:09 · 76 阅读 · 0 评论 -
树的操作
#include<algorithm> using namespace std; int n=0; template <class Datatype> struct Node { Datatype data; Node <Datatype> *lchild,*rchild; }; template <class Datatype> c...原创 2019-11-13 22:42:04 · 53 阅读 · 0 评论 -
java全排列算法
全排列 import java.util.Scanner; public class 十一月十二日第二个 { public static int total = 0; public static void swap(String[] str, int i, int j) { String temp = new String(); temp = str[i]; str[i] = s...原创 2019-11-12 15:30:13 · 75 阅读 · 0 评论 -
大位数求和模板
模板类处理大位数求和 #include<algorithm> using namespace std; const int MaxSize=100; template <typename DataType> class SeqList { public: SeqList(){length=0;} SeqList(DataType a[], int n); ...原创 2019-10-28 18:57:18 · 78 阅读 · 0 评论