一、线性表的查找 1、顺序查找: typedef KeyType int;//这个根据具体情况去定义;在这里定义为int; typedef struct{ KeyType key; InfoType otherinfo;//这个根据具体情况去改,这里只是抽象的说成还要添加这些类型。 }ElemTyp ...
分类:
其他好文 时间:
2020-06-27 13:29:49
阅读次数:
62
Pop Sequence:: Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to te ...
分类:
其他好文 时间:
2020-06-27 13:25:15
阅读次数:
53
题目 https://www.luogu.com.cn/problem/P4913 代码 #include<iostream> #include<cstdio> struct node { int left; int right; }list[1000001]; int depth = 0; voi ...
分类:
其他好文 时间:
2020-06-27 13:11:54
阅读次数:
75
1.本章的主要内容 2.关于反射的理解 Reflection(反射)是被视为动态语言的关键,反射机制允许程序在执行期借助于Reflection API取得任何类的内部信息,并能直接操作任意对象的内部属性及方法。 框架 = 反射 + 注解 + 设计模式。 3.体会反射机制的“动态性” //体会反射的动 ...
分类:
编程语言 时间:
2020-06-26 21:57:43
阅读次数:
48
#!/usr/bin/env python from struct import * import pandas as pd import numpy as np import os import re import pathlib import threading import time def ...
分类:
其他好文 时间:
2020-06-26 20:41:49
阅读次数:
57
Singleton: Make sure that there can be "only one instance" of a Class The Singleton class only provide a "static method" to get its object for example ...
分类:
其他好文 时间:
2020-06-26 20:37:18
阅读次数:
44
题目 https://www.luogu.com.cn/problem/P2121 分析 组织者被要求只能保留 K 条地毯,且保留的地毯构成的图中,任意可互相到达的两点间只能有一种方式互相到达: 要构成只有K条边的最大生成树——使用kruskal 代码 #include<iostream> #inc ...
分类:
其他好文 时间:
2020-06-26 19:55:48
阅读次数:
60
导入头文件 编写代码过程中,涉及动态内存分配等常用的函数,需要引入如下头文件 #include<stdio.h> #include<stdlib.h> 结构体定义 // 定义二分搜索树结构体 typedef struct Node { int data; struct Node * left; st ...
分类:
编程语言 时间:
2020-06-26 18:43:11
阅读次数:
77
原文:PythonGuru 协议:CC BY-NC-SA 4.0 欢迎任何人参与和完善:一个人可以走的很快,但是一群人却可以走的更远。 在线阅读 ApacheCN 学习资源 目录 初级 Python python 入门 安装 Python3 运行 python 程序 数据类型和变量 Python 数 ...
分类:
编程语言 时间:
2020-06-26 18:08:07
阅读次数:
93