![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
GlassySky0816
xuxu:kaggle Competitions Master(xuxu_sky)
展开
-
Leetcode: 三数之和
给你一个包含 n 个整数的数组nums,判断nums中是否存在三个元素 a,b,c ,使得a + b + c = 0 ?请你找出所有和为 0 且不重复的三元组。注意:答案中不可以包含重复的三元组。示例 1:输入:nums = [-1,0,1,2,-1,-4]输出:[[-1,-1,2],[-1,0,1]]示例 2:输入:nums = []输出:[]示例 3:输入:nums = [0]输出:[]https://leetcode-cn.com/problems/3sum/...原创 2021-05-09 22:06:44 · 202 阅读 · 0 评论 -
二叉树的一系列基本操作
#include #include #include #include using namespace std;#define MaxSize 50typedef char ElemType;typedef struct node{ ElemType data; struct node *lchild; struct node原创 2017-11-06 23:53:02 · 276 阅读 · 0 评论 -
数据结构——用栈解决简单迷宫问题
#include#includeusing namespace std;typedef int ElemType;#define MaxSize 50/*int mg[n1][n2]#define n1 50//定义行范围#define n2 50//定义列范围void array(int g,int h) //以二维数组形式定义迷宫内容{原创 2017-10-15 00:57:17 · 3539 阅读 · 2 评论 -
八种排序算法
//插入排序 void Insert_Sort(int *list,int count) { int temp;/*此处充当哨兵,不在list数组里面单独占一个单位*/ int i,j; for(i=1;i { if(list[i] { temp = list[i]原创 2017-11-15 22:55:42 · 164 阅读 · 0 评论