
数据结构
生有热烈-
这个作者很懒,什么都没留下…
展开
-
数据结构-二叉树
学习时写的代码,存在很多不足,有时间会进行优化#include <stdio.h>#include <stdlib.h>struct TreeNode{ int val ; TreeNode* left ; TreeNode* right ; };int CreatTree(TreeNode** root){ int val ; scanf("%d" , &val ) ; if(val<=0){ *root = NULL ; retur原创 2020-12-01 17:30:02 · 114 阅读 · 0 评论 -
数据结构-链表
自己学习时写的,有很多不足,以后有时间会进行优化#include <stdio.h>#include <malloc.h>struct node{//链表 int data ; node* next ; };struct node_dul{//双向链表 int data ; node_dul* next ; node_dul* prior ;};int ListDelete(node* head , int a ){ //传入链表,和想要删除元素的值原创 2020-12-01 17:28:14 · 174 阅读 · 0 评论