![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
链表学习
暖肚子的胖子
这个作者很懒,什么都没留下…
展开
-
C语言约瑟夫游戏循环链表实现
游戏描述:30 个人在一条船上,超载,需要 15 人下船。于是人们排成一队,排队的位置即为他们的编号。报数,从 1 开始,数到 9 的人下船。如此循环,直到船上仅剩 15 人为止,问都有哪些编号的人下船了呢?#include<stdio.h>#include<stdlib.h>struct shipper{ int num; struct shipper* p_num;};typedef struct shipper Shipper;int m原创 2021-11-15 16:52:12 · 154 阅读 · 0 评论 -
约瑟夫死亡游戏循环链表实现
游戏描述:30 个人在一条船上,超载,需要 15 人下船。于是人们排成一队,排队的位置即为他们的编号。报数,从 1 开始,数到 9 的人下船。如此循环,直到船上仅剩 15 人为止,问都有哪些编号的人下船了呢?#include<stdio.h>#include<stdlib.h>struct shipper{ int num; struct shipper* p_num;};typedef struct shipper Shipper;in.原创 2021-11-15 16:45:32 · 3937 阅读 · 0 评论 -
用C语言写一个简单的循环链表
#include<stdio.h>#include<stdlib.h>#include <string.h>struct node{ struct node* p_node; int data; } ;typedef struct node Node; int main(){Node* node_temp;//temp的作用主要作为中间元素节点Node* node_head;//头节点Node* node_ele;//节点元素.原创 2021-11-05 13:45:01 · 675 阅读 · 0 评论