- 1 、插入排序的详解 从第二个数字开始插入在之前的有有序系列中,直到末尾。 比如有个数组 int a[5] = {2, 5, 3, 1, 4}; 第 一次排序为:2, 5 ,3,1, 4 &nb... 1 、插入排序的详解 从第二个数字开始插入在之前的有有序系列中,直到末尾。 比如有个数组 int a[5] = {2, 5, 3, 1, 4}; 第 一次排序为:2, 5 ,3,1, 4 &nb...
- 1 问题 反转链表,比如0->1->2->3反转后变成了3->2->1->0 2 分析 搞3个指针,初始化一个指针,让头结点指向这里,然后另外一个指针初始化为NULL,然后让第一个节点指向这里,然后头结点依次... 1 问题 反转链表,比如0->1->2->3反转后变成了3->2->1->0 2 分析 搞3个指针,初始化一个指针,让头结点指向这里,然后另外一个指针初始化为NULL,然后让第一个节点指向这里,然后头结点依次...
- public class DLNode implements Node{ private Object elements; private DLNode pre; private DLNode next; public DLNode(){} public DLNode(Object elements, DLNode pre, DLNode ne... public class DLNode implements Node{ private Object elements; private DLNode pre; private DLNode next; public DLNode(){} public DLNode(Object elements, DLNode pre, DLNode ne...
- 1、题目 Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: s = "leetcode"return 0. s = "loveleetcode",return ... 1、题目 Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: s = "leetcode"return 0. s = "loveleetcode",return ...
- 前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程 1.概述 C 语言包含的数据类型如下图所示 2.各种数据类型介绍 2.1整型 整形包括短整型、整形和长整形。 2.1.1短整形 short a=1; 2.1.2整形 一般占4个字节(32位),最高位... 前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程 1.概述 C 语言包含的数据类型如下图所示 2.各种数据类型介绍 2.1整型 整形包括短整型、整形和长整形。 2.1.1短整形 short a=1; 2.1.2整形 一般占4个字节(32位),最高位...
- 1、题目 Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed fro... 1、题目 Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed fro...
- 1、指针数组 定义一个指针数组,该数组中每个元素是一个指针,每个指针指向哪里就需要程序中后续再定义 int *p[10]; 2、指向数组的指针 定义一个数组指针,该指针指向含10个元素的一维数组(数组中每个元素是int型) int (*p)[10]; 3... 1、指针数组 定义一个指针数组,该数组中每个元素是一个指针,每个指针指向哪里就需要程序中后续再定义 int *p[10]; 2、指向数组的指针 定义一个数组指针,该指针指向含10个元素的一维数组(数组中每个元素是int型) int (*p)[10]; 3...
- 1、问题 把参数字符串中字符反向排序,请使用指针而不是数组下标,不要使用任何C函数库中 2、实现 #include <stdio.h>#include <stdlib.h>/** * *函数把参数字符串中字符反向排序,请使用指针而不是数组下标,不要使用任何C函数库中 *用于操作字符串的函数. */void re... 1、问题 把参数字符串中字符反向排序,请使用指针而不是数组下标,不要使用任何C函数库中 2、实现 #include <stdio.h>#include <stdlib.h>/** * *函数把参数字符串中字符反向排序,请使用指针而不是数组下标,不要使用任何C函数库中 *用于操作字符串的函数. */void re...
- 1、题目 Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of the following cases hol... 1、题目 Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of the following cases hol...
- 1 问题 把字符串里面空格替换成20% 要求:时间复杂度是O(n) 2 思路 比如我们字符串ab cd ef,我们先计算出新字符串需要的长度,我们分别搞2个指针指向老的和新的字符串的尾巴,然后老字符串从'\0'开始拷贝数据到新的字符串尾巴,同时两个指针同时左移,如果老的字符... 1 问题 把字符串里面空格替换成20% 要求:时间复杂度是O(n) 2 思路 比如我们字符串ab cd ef,我们先计算出新字符串需要的长度,我们分别搞2个指针指向老的和新的字符串的尾巴,然后老字符串从'\0'开始拷贝数据到新的字符串尾巴,同时两个指针同时左移,如果老的字符...
- 1、题目 Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? For example, Given sorted array nums = [1,1,1,2,2,3], Your function should ... 1、题目 Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? For example, Given sorted array nums = [1,1,1,2,2,3], Your function should ...
- 1 快速排序 通过一趟排序将要排序的数据分割成独立的两部分,其中一部分的所有数据都比另外一部分的所有数据都要小,然后再按此方法对这两部分数据分别进行快速排序,整个排序过程可以递归进行,以此达到整个数据变成有序序列 2 分析思路 很明显,先是用到了 partition算法思想(前面的博客提到了),然后再把原始数据分... 1 快速排序 通过一趟排序将要排序的数据分割成独立的两部分,其中一部分的所有数据都比另外一部分的所有数据都要小,然后再按此方法对这两部分数据分别进行快速排序,整个排序过程可以递归进行,以此达到整个数据变成有序序列 2 分析思路 很明显,先是用到了 partition算法思想(前面的博客提到了),然后再把原始数据分...
- 1、题目 Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: s = "leetcode"return 0. s = "loveleetcode",return ... 1、题目 Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: s = "leetcode"return 0. s = "loveleetcode",return ...
- 1、问题 通过函数指针实现在链表中找到特定的值,这里可以是int 类型或者char *类型 思路: 整形数据自己写比较函数,字符串比较用strcmp,然后把这个函数指针传递到函数作为参数。 2、代码实现 #include <stdi... 1、问题 通过函数指针实现在链表中找到特定的值,这里可以是int 类型或者char *类型 思路: 整形数据自己写比较函数,字符串比较用strcmp,然后把这个函数指针传递到函数作为参数。 2、代码实现 #include <stdi...
- 字符串之变形数 题目:给定2个字符串str1和str2,如果str1和str2出现的字符种类和每个字符出现的个数也一样,那么str1与str2互为变形数。请用函数实现。 例子:str1="123", str2="231" 返回 true 例子:str1="123", str2="2311" 返回 false; ... 字符串之变形数 题目:给定2个字符串str1和str2,如果str1和str2出现的字符种类和每个字符出现的个数也一样,那么str1与str2互为变形数。请用函数实现。 例子:str1="123", str2="231" 返回 true 例子:str1="123", str2="2311" 返回 false; ...
上滑加载中
推荐直播
-
华为云码道-玩转OpenClaw,在线养虾2026/03/11 周三 19:00-21:00
刘昱,华为云高级工程师/谈心,华为云技术专家/李海仑,上海圭卓智能科技有限公司CEO
OpenClaw 火爆开发者圈,华为云码道最新推出 Skill ——开发者只需输入一句口令,即可部署一个功能完整的「小龙虾」智能体。直播带你玩转华为云码道,玩转OpenClaw
回顾中 -
华为云码道-AI时代应用开发利器2026/03/18 周三 19:00-20:00
童得力,华为云开发者生态运营总监/姚圣伟,华为云HCDE开发者专家
本次直播由华为专家带你实战应用开发,看华为云码道(CodeArts)代码智能体如何在AI时代让你的创意应用快速落地。更有华为云HCDE开发者专家带你用码道玩转JiuwenClaw,让小艺成为你的AI助理。
回顾中 -
Skill 构建 × 智能创作:基于华为云码道的 AI 内容生产提效方案2026/03/25 周三 19:00-20:00
余伟,华为云软件研发工程师/万邵业(万少),华为云HCDE开发者专家
本次直播带来两大实战:华为云码道 Skill-Creator 手把手搭建专属知识库 Skill;如何用码道提效 OpenClaw 小说文本,打造从大纲到成稿的 AI 原创小说全链路。技术干货 + OPC创作思路,一次讲透!
回顾中
热门标签