- 博客(6)
- 问答 (2)
- 收藏
- 关注
原创 Mybatis入门
Mybatis入门步骤1、编写User数据表2、编写User实体类package com.example.MyBatis_Learn1;import org.apache.ibatis.annotations.Param;public class User { private int id; private String userName; private String userPwd; public int getId() { return
2021-06-27 11:13:38
158
原创 使用IDEA2021构建第一个struts2项目
使用IDEA2021构建第一个struts2项目1、file → new project 选择JavaEnterprise(也可以使用Maven等构建),项目结构如下:2、打开pom.xml添加以下代码,加入位置如图:<dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-core</artifactId> <version&g
2021-05-15 00:20:54
1768
4
原创 二叉排序树的创建
二叉排序树的创建#include<iostream>using namespace std;struct Node{ Node* lchild; Node* rchild; int data;};void insertBST(Node*& T,int e)//二叉排序树插入{ if (T) { if (e < T->data) insertBST(T->lchild, e); if (e > T-
2020-06-20 10:44:16
772
原创 二叉树的基本操作
二叉树的一些基本操作#include<iostream>#include<queue>using namespace std;struct Node{ Node* lchild; Node* rchild; int data;};queue<Node*>q;void initTree(Node*& T)//创建二叉树{ int x; cin >> x; if (x != 0) { T = new Node;
2020-06-20 10:21:21
223
原创 HDU2527 Safe Or Unsafe
HDU2527题目地址算法思想:给出一串字符串,和一个安全数值,字母出现的频率等于该字符的权重。建立哈夫曼树,计算带权路径长,带权路径长小于等于安全数值输出yes否则输出no。代码如下:#include<iostream>using namespace std;struct HuffmanTree{ int weight; int parent, lchild, ...
2020-04-21 21:17:38
251
原创 基于深度优先搜索,判断一个无向图是否为一棵树
算法思想:map必须是无回路的连通图或者是n-1条边的连通图。采用深度优先搜索算法遍历途中可能访问到的顶点个数和边数,如果一次遍历能访问到n个顶点和n-1条边,则是一棵树。代码如下(以5*5的矩阵为例):#include<iostream>using namespace std;int map[5][5];int supMap[5][5] = { 0 };//辅助矩阵i...
2020-04-21 20:58:15
1901
空空如也
JavaWeb关于postman的访问数据不一致的问题
2021-10-21
关于C++类的一个细节上的小问题
2020-04-20
TA创建的收藏夹 TA关注的收藏夹
TA关注的人