二分查找-主函数,自定义函数。 摘要:# 二分查找 即对于一个有序的一维数组,查找数组中某一个元素的方法。 本部分分为两部分; 1.主函数的二分查找; )1定义一个数组arr[]={0,1,2,3,4,5,6,7,8,9}…… 文章列表 2022年10月29日 0 点赞 0 评论 209 浏览 评分:9.9
字符串常用输入方法(C++) 摘要:(1)cin>>char s[20]; cin>>s;遇到空格,tab,回车都会结束(2)cin.get()char ch; ch=cin.get(); cin.get(); //可以用来吃…… 文章列表 2022年10月31日 0 点赞 0 评论 220 浏览 评分:9.9
算法图解 分享 摘要:#####本书示例丰富,图文并茂,以让人容易理解的方式阐释了算法,旨在帮助程序员在日常项目中更好地发挥算法的能量。书中的前三章将帮助你打下基础,带你学习二分查找、大O表示法、两种基本的数据结构以及递归…… 文章列表 2022年11月03日 0 点赞 0 评论 231 浏览 评分:9.9
不使用string.h头文件计算字符长度 摘要:#include<stdio.h> #include<math.h> int main(void) { int num, count=0; scanf_s("%d", &num); …… 文章列表 2022年11月03日 0 点赞 0 评论 168 浏览 评分:9.9
幸运儿的单链表算法 摘要:#include<stdio.h>#include<malloc.h>#define MAX 50typedef struct test { struct test* next; int …… 文章列表 2022年11月06日 0 点赞 0 评论 331 浏览 评分:9.9
大数斐波那契数列 摘要:原题为洛谷p2437利用string的加法特性f[i]=f[i-1]+f[i-2]#include<bits/stdc++.h> using namespace std; string fb[10…… 文章列表 2022年11月12日 0 点赞 0 评论 220 浏览 评分:9.9
c语言文件操作 摘要:#include<stdio.h> #include<stdlib.h> #include<string.h> //交换字母的代码 void swap(char *s,int i,int j…… 文章列表 2022年11月19日 0 点赞 0 评论 178 浏览 评分:9.9
删除链表中指定的值 摘要:/* 写一个函数del,用来删除动态链表中指定的节点 */ #include<stdio.h> #include<stdlib.h> typedef struct LNod…… 文章列表 2022年11月22日 0 点赞 2 评论 118 浏览 评分:9.9
向链表插入数据 摘要:/* 写一个函数insert,用来向一个动态链表插入结点 */ #include<stdio.h> #include<stdlib.h> typedef struct LN…… 文章列表 2022年11月22日 0 点赞 1 评论 110 浏览 评分:9.9
链表增删改查 摘要:#include <stdio.h> #include <stdlib.h> #define COUNT 5 typedef struct LNode { int num; struc…… 文章列表 2022年11月22日 0 点赞 1 评论 146 浏览 评分:9.9