- 1、题目 For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now is to design a rectangular web ... 1、题目 For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now is to design a rectangular web ...
- 1 问题 打印链表的倒数第N个节点的值,(要求能只能便利链表一次) 比如链表如下,打印倒数第三个值就是4 1-> 2-> 3-> 4-> 5-> 6 2 思路 既然只要只能遍历一次,我们可以这样思考,比如我... 1 问题 打印链表的倒数第N个节点的值,(要求能只能便利链表一次) 比如链表如下,打印倒数第三个值就是4 1-> 2-> 3-> 4-> 5-> 6 2 思路 既然只要只能遍历一次,我们可以这样思考,比如我...
- C语言中数组允许定义类型的变量,可容纳相同类型的多个数据项,但结构体在C语言编程中,它允许定义不同种类的数据项可供其他用户定义的数据类型。 结构是用来代表一个记录,假设要跟踪图书馆的书籍。可能要跟踪有关每本书以下属性: Title - 标题 Author - 作者 Subject - 科目 Book ID -编号 定义结... C语言中数组允许定义类型的变量,可容纳相同类型的多个数据项,但结构体在C语言编程中,它允许定义不同种类的数据项可供其他用户定义的数据类型。 结构是用来代表一个记录,假设要跟踪图书馆的书籍。可能要跟踪有关每本书以下属性: Title - 标题 Author - 作者 Subject - 科目 Book ID -编号 定义结...
- 1、题目: Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 2、代码实现: 代码实现1: public static S... 1、题目: Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 2、代码实现: 代码实现1: public static S...
- 1、问题 二位字符串数组用指针数组、数组指针、二级指针打印 2、测试代码 #include <stdio.h> int main(){ char value[4][5] = {"chen", "yu", "feng", "yy"}; char *p[5]; ch... 1、问题 二位字符串数组用指针数组、数组指针、二级指针打印 2、测试代码 #include <stdio.h> int main(){ char value[4][5] = {"chen", "yu", "feng", "yy"}; char *p[5]; ch...
- 1、线性查找 比如字符串 char s[] = "chenyu"; 如果我们是线性查找的话,就是从字符‘c’依次到字符串结尾‘u’查找 2、折半查找 注意查找之前必须是有序的 比如整形数组 int a[10] = {1, 2, 7, 9, 10}; 查找数字2 我们可以定义 首和尾巴,拿需要查找的数据和 首和尾巴下表除以2这个坐标数据对比 如果这个查找的数字比... 1、线性查找 比如字符串 char s[] = "chenyu"; 如果我们是线性查找的话,就是从字符‘c’依次到字符串结尾‘u’查找 2、折半查找 注意查找之前必须是有序的 比如整形数组 int a[10] = {1, 2, 7, 9, 10}; 查找数字2 我们可以定义 首和尾巴,拿需要查找的数据和 首和尾巴下表除以2这个坐标数据对比 如果这个查找的数字比...
- 1 问题 求圆圈最后剩下的数,比如数组0, 1, 2 ,3 ,4围城一个环,我们每次去掉第三个数字,删除的前4个数字依次是2, 0, 4, 1,最后剩下的数字是3 0 ... 1 问题 求圆圈最后剩下的数,比如数组0, 1, 2 ,3 ,4围城一个环,我们每次去掉第三个数字,删除的前4个数字依次是2, 0, 4, 1,最后剩下的数字是3 0 ...
- 单链表的反转是常见的面试题目。本文总结了2种方法。 1 定义 单链表node的数据结构定义如下: class ListNode { int val; ListNode next; ListNode(int x) { val = x; next = null; }} 2 方法1:就地反转法 2.1 思路 把当前链表的下一个节点pCur插入到头结... 单链表的反转是常见的面试题目。本文总结了2种方法。 1 定义 单链表node的数据结构定义如下: class ListNode { int val; ListNode next; ListNode(int x) { val = x; next = null; }} 2 方法1:就地反转法 2.1 思路 把当前链表的下一个节点pCur插入到头结...
- 1、题目 2.美国联邦政府使用下面这些规则计算1995年每个公民的个人收入所得税: 输入大于 不超过 你的税额为 超过这个数额的部分 $0 $2335015% ... 1、题目 2.美国联邦政府使用下面这些规则计算1995年每个公民的个人收入所得税: 输入大于 不超过 你的税额为 超过这个数额的部分 $0 $2335015% ...
- 1、题目 Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given a = 1 and b = 2, return 3. Credits: Special thanks to @fujia... 1、题目 Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given a = 1 and b = 2, return 3. Credits: Special thanks to @fujia...
- 1、题目 Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the number and for the multiples... 1、题目 Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the number and for the multiples...
- 1、题目 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close i... 1、题目 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close i...
- #include <stdio.h>#include <string.h>#include <stdlib.h>#define N 10typedef struct node{ char name[20]; struct node *llink,*rlink;}stud;/*双链表的结构定义*/ /*双链表的创建*/stud * creat... #include <stdio.h>#include <string.h>#include <stdlib.h>#define N 10typedef struct node{ char name[20]; struct node *llink,*rlink;}stud;/*双链表的结构定义*/ /*双链表的创建*/stud * creat...
- 1、题目 Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated t... 1、题目 Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated t...
- 题目: 求数组里面的最大值和最小值 比如:数组 1,2,3,4,5 最大值是5,最小值是1 代码实现: #include <stdio.h>int max,min;void getMaxAndMin(int a[],int n){ int *q; q=a; max=min=*a; for(q;... 题目: 求数组里面的最大值和最小值 比如:数组 1,2,3,4,5 最大值是5,最小值是1 代码实现: #include <stdio.h>int max,min;void getMaxAndMin(int a[],int n){ int *q; q=a; max=min=*a; for(q;...
上滑加载中
推荐直播
-
华为云码道Agent集成与鸿蒙实战2026/08/11 周二 19:00-21:00
王一男-华为云码道产品规划专家;李炎-华为云码道产品专家;彭江敏-华为云鸿蒙端云一体化开发专家
本次直播带你解读华为云码道7月份产品新特性、新功能。更有专家演示码道Agent Space × 钉钉机器集成实战,从0到1打通消息通道;码道鸿蒙端云一体化实战,快速搭建员工签到系统。
回顾中 -
华为云开发者AI素养直播课·第五期2026/09/04 周五 16:00-18:00
林华鼎-华为云AI开发者运营负责人;蒋春阳-华为云AI开发者案例开发专家
本期直播内容: AI工具体验营 · 第5-8课连讲。Agent-Team 多智能体协作完成毕业设计实践
回顾中 -
华为云开发者AI素养ClassRoom·第六期2026/09/08 周二 19:00-20:00
樊渊-2026华为软件挑战赛冠军
高手来了:看软挑高手解析二维排样问题—从工业难题到算法突破
回顾中
热门标签