【C++较复杂版解法】 摘要:参考代码:#include <iostream> using namespace std; int main() { int list[100],N,temp,i; for(i=0;i<…… 题解列表 2021年06月22日 0 点赞 0 评论 202 浏览 评分:0.0
[编程入门]数组插入处理!!新手理解,超级简单的思路!! 摘要:解题思路:两个数组;一个已经给出的排好序的数组A,一个是插入之后的数组B;找到要插入的数x的位置,即依次与比较A中的每个元素比较,找到两元素ab,,使得a<x<b,小于x的元素依序保存在数组B的第1-…… 题解列表 2021年06月14日 0 点赞 0 评论 431 浏览 评分:9.9
优质题解 1025: [编程入门]数组插入处理——题解 摘要:解题思路:这是常规思路,类似按身高排队一样,已经排好的队,你想插进去,找到比你矮的和比你高的前后两个人,之后的人往后退一步就行了。首先是输入只含有9个元素的数组a[10],用for循环依次输入。接着输…… 题解列表 2021年05月07日 0 点赞 66 评论 15185 浏览 评分:8.8
1025: [编程入门]数组插入处理(C语言) 摘要:#include <stdio.h>int main (){ int a[10]; //遍历输入 int i = 0; for (i=0;i<9;i++) { scanf("%d",&a[i])…… 题解列表 2021年05月02日 0 点赞 0 评论 225 浏览 评分:0.0
利用sort函数 摘要:解题思路:利用algorithm的sort函数对插入后的数组重新进行从小到大的排序注意事项:参考代码:#include<iostream>#include<algorithm>using namesp…… 题解列表 2021年04月17日 0 点赞 0 评论 177 浏览 评分:0.0
数组插入处理 摘要:#include <stdio.h>int main(void){ int a[10] = { 0 }; int i; int n; int x = 1; for (i = 0; i <= 8; i+…… 题解列表 2021年04月09日 0 点赞 0 评论 167 浏览 评分:0.0
数组插入处理(指针法) 摘要:解题思路:利用指针的特性,将指针移位并将数字填入注意事项:参考代码:#include<stdio.h>int main(){ int a[10],i,n,m; int *p=a; for(i=0;i…… 题解列表 2021年04月08日 0 点赞 0 评论 264 浏览 评分:6.0
发现题目测试bug,快来瞅瞅撒! 摘要:解题思路:注意事项:参考代码首先提供两个代码这是有漏洞的代码:#include <stdio.h>#include <stdlib.h>int main(){ int i=0,a[24]= {0…… 题解列表 2021年04月07日 0 点赞 0 评论 271 浏览 评分:9.9
数组插入处理 摘要:解题思路:先把要加的数放在数组的最后面,再通过比较大小寻找合适放置的位置注意事项:参考代码:#include<stdio.h>int main(){ int a[10]; int i; for(i=0…… 题解列表 2021年04月07日 0 点赞 0 评论 170 浏览 评分:0.0
容易理解的C语言代码 摘要:解题思路: 虽然没必要用这么复杂的方法, 但就当是温习一下快速排序的算法吧注意事项:参考代码:#include <stdio.h> int partition(int arr[], …… 题解列表 2021年04月01日 0 点赞 0 评论 156 浏览 评分:0.0