07 2022 档案
摘要:
1.岛屿的个数 https://blog.csdn.net/qq_36136459/article/details/104326796 给定一个由 ‘1’(陆地)和 ‘0’(水)组成的的二维网格,计算岛屿的数量。一个岛被水包围,并且它是通过水平方向或垂直方向上相邻的陆地连接而成的。你可以假设网格的四
阅读全文

摘要:
1.二分查找(有序数组) https://blog.csdn.net/qq_63918780/article/details/122527681 1 #include <stdio.h> 2 #include <string.h> 3 4 int func(int *a,int j,int x) 5
阅读全文

摘要:
1.买卖股票的最佳时机 https://blog.csdn.net/qq_41277628/article/details/113322136 输入:[7,1,5,3,6,4] 输出:5 解释:在第 2 天(股票价格 = 1)的时候买入,在第 5 天(股票价格 = 6)的时候卖出,最大利润 = 6-
阅读全文

摘要:
1.将一个数组逆序输出 https://blog.csdn.net/qq_45385706/article/details/110739961 1 #include<stdio.h> 2 3 #define N 9 4 5 int main() 6 { 7 int a[N] = {1,2,3,4,5
阅读全文

摘要:
1.打印杨辉三角 1 #include <stdio.h> 2 #include <string.h> 3 4 int main() 5 { 6 int x; 7 int a[100][100]; 8 printf("输入行数\n"); 9 scanf("%d",&x); 10 for(int i
阅读全文

摘要:
1.怎样将整数转化为字符串,并且不用函数itoa. 解析:整数转化为字符串,可以采用加‘0’,再逆序的办法 整数加‘0’就会隐性转化成char类型的数。 1 #include <stdio.h> 2 3 int main() 4 { 5 int num = 12345,i = 0,j = 0; 6
阅读全文

摘要:
1.系统启动流程。 uboot -> kernel -> 根文件系统。 uboot第一阶段属于汇编阶段: 定义入口(start.S):uboot中因为有汇编阶段参与,因此不能直接找main.c。 设置异常向量:当硬件发生故障的时候CPU会强制PC指针指向对应的异常入口执行代码。 设置CPU为SVC模
阅读全文
