单链表的构建

#include <iostream> using namespace std; struct node { int data; struct node *next; }; **//尾插法构建不带头结点的单链表** struct node * creat_wf(int n) { struct node *head; struct node *p,*q; head = NULL; for(int i=0;i<n;i++) {
分类: 其他 发布时间: 04-24 22:18 阅读次数: 0

单链表的插入和删除

#include <iostream> using namespace std; **//**链表不是随机存取结构,不能直接按序号访问结点。头结点可以看做第0个结点,所以计数器j加到i时为第i个结点。** typedef struct node { int data; struct node *next; }ListNode; **//创建带头结点的单链表** ListNode * creat_l(int n) { ListNode *head; ListN
分类: 其他 发布时间: 04-24 22:17 阅读次数: 0

二叉树的构建与遍历(最简单的二叉树)

#include <iostream> using namespace std; **//****定义节点的类模板。二叉树的节点是一个类的实例,该类由一个信息成员和两个指针成员组成***** template <typename T> class binaryTreeNode { public: T element; binaryTreeNode<T> *leftchild; binaryTreeNode<T> *rightchild; binaryTreeNode()
分类: 其他 发布时间: 04-24 22:17 阅读次数: 0

二叉树的先序,中序,后序遍历举例

eg1: 前序遍历:ABCDEFGHK 中序遍历:BDCAEHGKF 后序遍历:DCBHKGFEA eg2: 前序遍历:1 2 4 5 7 8 3 6 中序遍历:4 2 7 5 8 1 3 6 后序遍历:4 7 8 5 2 6 3 1 层次遍历:1 2 3 4 5 6 7 8
分类: 其他 发布时间: 04-24 22:17 阅读次数: 0

100.Same Tree

description: Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical and the nodes have the same value. Example 1: Input: 1 1 / \ / 2 3 2 3 [1,2,3
分类: 其他 发布时间: 04-24 22:16 阅读次数: 0

107. Binary Tree Level Order Traversal II(二叉树广度遍历,自底向上输出)

problems: Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root). For example: Given binary tree [3,9,20,null,null,15,7], 3 / \ 9 20 / \ 15
分类: 其他 发布时间: 04-24 22:16 阅读次数: 0

c++中vector初始化问题,push_back

一.在c++中使用vector时一般不会指定它的容量大小,因为vector在运行时能高效快速地添加元素。通常都是开始的时候创建空的vector对象,在运行时再动态添加元素。vector中push_back添加元素时,是在末尾添加。 #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> res; for(int i=0;i<1
分类: 其他 发布时间: 04-24 22:15 阅读次数: 0

112.Path Sum

problems: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. Note: A leaf is a node with no children. Example: Given the below binary tree and sum = 22
分类: 其他 发布时间: 04-24 22:14 阅读次数: 0

CSS Table合并单元格

版权声明:@今年依旧12岁 https://blog.csdn.net/qq_34087199/article/details/88567205 colspan:左右合并单元格的个数; 用法:colspan=“3” 横向合并三个单元格‘。 rowspan:上下合并单元格的个数; 用法:rowspan="3"垂直合并三个单元格。 <table> <thead> <tr> <th>ID</th> <th>Name</th> <th>Subject</th
分类: 其他 发布时间: 04-24 22:14 阅读次数: 0

CSS Radio控件

版权声明:@今年依旧12岁 https://blog.csdn.net/qq_34087199/article/details/88572222 1. 获取选中的radio的值: <div class="col-md-2 radio"> <label><input type="radio" name="AMorPM" id="AM" value="AM" checked>AM</label> <label><input type="radio" name="AMorPM" id="PM"
分类: 其他 发布时间: 04-24 22:14 阅读次数: 0

Bootstrap datetimepicker控件

版权声明:@今年依旧12岁 https://blog.csdn.net/qq_34087199/article/details/88573021 List item控件使用: Bootstrap datetimepicker 官方API <div class="col-md-2"> <label for="date" class="text-right fix-width">Date:</label> <input size="16" type="text" id="date" value
分类: 其他 发布时间: 04-24 22:13 阅读次数: 0

X+一个数为平方根,X+另一个数还为平方根

版权声明:@今年依旧12岁 https://blog.csdn.net/qq_34087199/article/details/88578172 因式分解算法 int element = Num; //用于因式分解的数 int flag = element; Dictionary<int, int> factor = new Dictionary<int, int>(); //Value>Key for (int i = 1; i < flag ; i++) { if (elem
分类: 其他 发布时间: 04-24 22:13 阅读次数: 0

TensorFlow Learning

Tensorflow官网 交叉熵简介 深度学习的起源
分类: 其他 发布时间: 04-24 22:12 阅读次数: 0

Python安装包的步骤

版权声明:@今年依旧12岁 https://blog.csdn.net/qq_34087199/article/details/88948140 pip isntall + 包名 如果直接安装失败 先在网上下载要安装的包(.whl文件) Python包的下载地址:https://pypi.org/ cd 到本地文件夹 ->pip install + 包名 或者: pip install -e + 本地 setup.py文件的路径
分类: 其他 发布时间: 04-24 22:12 阅读次数: 0

不定长数组

版权声明:@今年依旧12岁 https://blog.csdn.net/qq_34087199/article/details/89487924 使用泛型List<>转换 List<string> mylist = new List<string>(); if (Line.Contains(',')) { string[] a = Line.Split(','); for(int i
分类: 其他 发布时间: 04-24 22:12 阅读次数: 0

对Config文件的操作

版权声明:@今年依旧12岁 https://blog.csdn.net/qq_34087199/article/details/89490985 <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="" value=""/> </appSettings> </configuration> using System.Configuration //获取key值 st
分类: 其他 发布时间: 04-24 22:12 阅读次数: 0

FileStream类

FileStream类 对流进行操作时要引用 using System.IO; 命名空间 FileStream常用的属性和方法: 属性: CanRead 判断当前流是否支持读取,返回bool值,True表示可以读取 CanWrite 判断当前流是否支持写入,返回bool值,True表示可以写入 方法: Read() 从流中读取数据,返回字节数组 Write() 将字节块(字节数组)写入该流 Seek() 设置文件读取或写入的起始位置 Flush() 清除该流缓冲区,使得
分类: 其他 发布时间: 04-24 22:11 阅读次数: 0

关于Dictionary类、List类的学习与应用

版权声明:@今年依旧12岁 https://blog.csdn.net/qq_34087199/article/details/88573757 概述:Dictionary类和List类都是抽象类 1. dictionary类 定义:用来存储键/值对 Dictionary<string,string> dic=new Dictionary<string,string>; 属性: // 在JS中,Dictionary类没有length属性,获取dictionary的length var arr
分类: 其他 发布时间: 04-24 22:11 阅读次数: 0

App自动化(2)--Python&Appium实现安卓手机九宫格解锁

九宫格作为常见的手势密码,我们在使用的时候,是从起点开始,按住不放,然后滑动手指,直到最后一个点松开手指,如果与设置的手势密码匹配,则解锁成功。 现在大多数九宫格作为一个元素存在,很难定位到每一个点。 解决思路有两个,一是用指针定位每一个点;二是先获取元素坐标位置,再获取元素大小,然后切割图片,分别计算出每个点的坐标; 本次笔记记录第一个解决思路: 目的:创建一个Unlock类,按顺序传入九宫格的解锁数字即可实现主屏幕解锁 模拟器:夜神 1、坐标定位到每个点 A、夜神模拟器开发者选项中开启指针
分类: 其他 发布时间: 04-24 22:11 阅读次数: 0

消息中间件——activeMQ

Activemq使用教程 解压activmq进入bin\win64 启动activemq.bat 启动成功 浏览器访问http://127.0.0.1:8161 创建maven工程 在pom.xml中添加依赖 <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-all</artifactId> <version>5.15.8</version> </depende
分类: 其他 发布时间: 04-24 22:11 阅读次数: 0