- 博客(3)
- 收藏
- 关注
原创 BF算法和KMP算法比较次数的计算
#include<stdio.h>#include<string.h>using namespace std;int BF(char A[], char B[]){ int i =0, j = 0,count=0; while (i < strlen(A)&& j < strlen(B) ) { count++; //两个字符串均为比较到串尾(只有有一个到串尾就跳出循环) ...
2021-11-23 17:39:24
1547
原创 abc三个数实现前插其余若为已知量可就此类推
#include<stdio.h>/*01 构建链表02 初始化链表 注意头节点 直接赋值03 输出链表*/struct stu{ int num; float score; struct stu *next;};void PX(struct stu a,struct stu b,struct stu c,struct stu *head){ head = &c; c.next = &b;...
2021-11-23 17:31:42
314
原创 n的阶乘递归非递归的实现
#include<stdio.h>#include<stdlib.h>#include<time.h>int load(int n){ int i,sum; sum=1; for(i=1;i<=n;i++) { sum=sum*i; } printf("%d",sum); return 0;}int had(int n){ if (n==0) return 1;...
2021-11-23 17:26:49
963
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人