一、今日学习内容 1、学习第三章:查找 (1)顺序查找 1 public class OrderFind { 2 public static void main(String[] args) { 3 int[] ary= {2,3,4,5,9,7,8}; 4 int find=5; 5 int co ...
分类:
其他好文 时间:
2020-07-11 22:46:41
阅读次数:
76
题目描述 给定一个完美二叉树,其所有叶子节点都在同一层,每个父节点都有两个子节点。二叉树定义如下: struct Node { int val; Node *left; Node *right; Node *next; } 填充它的每个 next 指针,让这个指针指向其下一个右侧节点。如果找不到下一 ...
分类:
其他好文 时间:
2020-07-11 22:35:36
阅读次数:
74
一、递归与迭代 二、什么是迭代器协议 1、迭代器协议是指:对象必须提供一个next方法,执行该方法要么返回迭代中的下一项,要么就引起一个stopiteration异常,已终止迭代(只能往后走不能往前退) 2、可迭代对象:实现了迭代器协议的对象(如何实现:对象内部定义一个__iter__()方法) 3 ...
分类:
编程语言 时间:
2020-07-11 19:47:04
阅读次数:
68
When I was a kid, the disaster we worried about most was a nuclear war. [wen a? w?z ? k?d] ...
分类:
其他好文 时间:
2020-07-11 19:30:07
阅读次数:
58
数组模拟单链表,图论的基础 单链表用的最多的是邻接表,邻接表是n个单链表,邻接表是树和图的存储方式 单链表 >> 邻接表 >> 存储树和图 单链表开始时是head指向空节点 插入元素后长这样 每个节点存储两个值 值:val 指针:next 然后用数组模拟就需要定义几个数组 e[N]:存储每个节点的v ...
分类:
其他好文 时间:
2020-07-11 17:43:21
阅读次数:
62
You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a ...
分类:
其他好文 时间:
2020-07-11 10:04:24
阅读次数:
84
Flatten a Multilevel Doubly Linked List (M) 题目 You are given a doubly linked list which in addition to the next and previous pointers, it could have a ...
分类:
其他好文 时间:
2020-07-11 09:25:02
阅读次数:
50
You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a ...
分类:
其他好文 时间:
2020-07-11 09:24:32
阅读次数:
64
链表: 链表开头: struct list{ int data; struct list *next;};typedef struct list single; 创建链表节点的流程: (1)给当前的每个节点的数据结构配置定量的空间大小 struct list *node = malloc(sizeo ...
分类:
其他好文 时间:
2020-07-10 22:36:08
阅读次数:
65
git是当前最流行的版本控制系统,下面简单记录一下git的安装及其与远程仓库的关联。 git安装 打开git官网,下载对应的安装包。 双击运行安装包,安装过程中可以直接选择默认配置,一路next下去。 安装过程相对简单,在此不再赘述。可以参考这篇文章 git与远程仓库关联 1.用户配置 git安装完 ...
分类:
其他好文 时间:
2020-07-10 21:16:32
阅读次数:
61