- 1、题目 Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Note: The input is assumed to be a 32-bit signed inte... 1、题目 Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Note: The input is assumed to be a 32-bit signed inte...
- 1 满二叉树 除最后一层无任何子节点外,每一层上的所有结点都有两个子结点的二叉树。一个二叉树,如果每一个层的结点数都达到最大值,则这个二叉树就是满二叉树。也就是说,如果一个二叉树的层数为K,且结点总数是(2^k) -1 ,则它就是满二叉树。 2 分析 我们知道满二叉树是三角形的比如... 1 满二叉树 除最后一层无任何子节点外,每一层上的所有结点都有两个子结点的二叉树。一个二叉树,如果每一个层的结点数都达到最大值,则这个二叉树就是满二叉树。也就是说,如果一个二叉树的层数为K,且结点总数是(2^k) -1 ,则它就是满二叉树。 2 分析 我们知道满二叉树是三角形的比如...
- 1、题目 Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one mor... 1、题目 Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one mor...
- 1 问题 给你一根长度为n的绳子,请把绳子剪成m段 (m和n都是整数,n>1并且m>1)每段绳子的长度记为k[0],k[1],…,k[m]. 请问k[0] * k[1] …k[m]可能的最大乘积是多少? 例如,当绳子的长度为8时,我们把它剪成长度分别为2,3,3的三段,此时得到的最大乘积是18. &... 1 问题 给你一根长度为n的绳子,请把绳子剪成m段 (m和n都是整数,n>1并且m>1)每段绳子的长度记为k[0],k[1],…,k[m]. 请问k[0] * k[1] …k[m]可能的最大乘积是多少? 例如,当绳子的长度为8时,我们把它剪成长度分别为2,3,3的三段,此时得到的最大乘积是18. &...
- 1 问题 我的buff在if{}里面,然后对buff进行内存操作,最后赋值给char *类型的url,发现url最后没有得到数据 如下代码 #include <stdio.h>#define TRUE 1 void set_value(char *p){ *p = 'c'; *(p + 1) = 'h'; *(p + 2) = 'e'; *(p + 3) =... 1 问题 我的buff在if{}里面,然后对buff进行内存操作,最后赋值给char *类型的url,发现url最后没有得到数据 如下代码 #include <stdio.h>#define TRUE 1 void set_value(char *p){ *p = 'c'; *(p + 1) = 'h'; *(p + 2) = 'e'; *(p + 3) =...
- 题目: 字符串之找到字符串的最大无重复字符子串 举例: str = "adcd" return 4 str = "aabcd" I know this str is 'adc' so return 3 要求: 时间复杂度为O(N) 代码实现: package com.chenyu.string.cn; public cl... 题目: 字符串之找到字符串的最大无重复字符子串 举例: str = "adcd" return 4 str = "aabcd" I know this str is 'adc' so return 3 要求: 时间复杂度为O(N) 代码实现: package com.chenyu.string.cn; public cl...
- 1 问题 反向打印链表值 2 思考 1) 我们利用栈的思想,新进后出,把链表的每个元素分别入栈之后再打印栈 2)既然上面用到了栈,我们应该就会想到用到递归来实现 3 代码实现 #include &l... 1 问题 反向打印链表值 2 思考 1) 我们利用栈的思想,新进后出,把链表的每个元素分别入栈之后再打印栈 2)既然上面用到了栈,我们应该就会想到用到递归来实现 3 代码实现 #include &l...
- 1、题目 Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive integer, replace the number by... 1、题目 Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive integer, replace the number by...
- 1、联合体的特点和大小 union是共用一个内存首地址,联合体中每个成员的地址都相同,等于联合体变量的首地址 联合体的大小足够容纳最宽的成员,大小能被其包含的所有基本数据类型的大小所整除 2、测试Demo #include <stdio.h> union var { long i... 1、联合体的特点和大小 union是共用一个内存首地址,联合体中每个成员的地址都相同,等于联合体变量的首地址 联合体的大小足够容纳最宽的成员,大小能被其包含的所有基本数据类型的大小所整除 2、测试Demo #include <stdio.h> union var { long i...
- 目录 前言创建枚举迭代枚举比较枚举enum.IntEnum 唯一枚举值代码中创建枚举 前言 之所以博主思考再三,开设一个数据结构的基础冷门课程。是因为目前大多数数据结构的书籍都使用的是C/C++,无疑增加了学习的门槛。 而python语言相对来说,更容易入门掌握,通过python学习数据结构与算法,对于初学者似乎更加的友好。 本篇,首先介绍的是枚... 目录 前言创建枚举迭代枚举比较枚举enum.IntEnum 唯一枚举值代码中创建枚举 前言 之所以博主思考再三,开设一个数据结构的基础冷门课程。是因为目前大多数数据结构的书籍都使用的是C/C++,无疑增加了学习的门槛。 而python语言相对来说,更容易入门掌握,通过python学习数据结构与算法,对于初学者似乎更加的友好。 本篇,首先介绍的是枚...
- package com.zuo.linkedlist; import java.util.Stack; import com.zuo.linkedlist.Josephuskill2.Node; /** * 题目:给定一个头结点,判断该链表是否回文结构 * 例如: * 1->2->1 true * 1->2->2->1 true * 1->... package com.zuo.linkedlist; import java.util.Stack; import com.zuo.linkedlist.Josephuskill2.Node; /** * 题目:给定一个头结点,判断该链表是否回文结构 * 例如: * 1->2->1 true * 1->2->2->1 true * 1->...
- 1、题目 数据结构之求二叉树的所有叶子和以及叶子总数 2、代码实现 tree.java package leetcode.chenyu.test; public class Tree { int val; Tree left; Tree r... 1、题目 数据结构之求二叉树的所有叶子和以及叶子总数 2、代码实现 tree.java package leetcode.chenyu.test; public class Tree { int val; Tree left; Tree r...
- 1、题目 Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function twoSum should return in... 1、题目 Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function twoSum should return in...
- 1、问题 C++字符串的切割 2、代码 #include <iostream>#include <string>#include <vector> std::vector<std::string> splite(const std::string &value, const std... 1、问题 C++字符串的切割 2、代码 #include <iostream>#include <string>#include <vector> std::vector<std::string> splite(const std::string &value, const std...
- The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Please note that your returned answers (both index1 ... The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Please note that your returned answers (both index1 ...
上滑加载中
推荐直播
-
码道新技能,AI 新生产力——从自动视频生成到开源项目解析2026/04/08 周三 19:00-21:00
童得力-华为云开发者生态运营总监/何文强-无人机企业AI提效负责人
本次华为云码道 Skill 实战活动,聚焦两大 AI 开发场景:通过实战教学,带你打造 AI 编程自动生成视频 Skill,并实现对 GitHub 热门开源项目的智能知识抽取,手把手掌握 Skill 开发全流程,用 AI 提升研发效率与内容生产力。
回顾中 -
华为云码道:零代码股票智能决策平台全功能实战2026/04/18 周六 10:00-12:00
秦拳德-中软国际教育卓越研究院研究员、华为云金牌讲师、云原生技术专家
利用Tushare接口获取实时行情数据,采用Transformer算法进行时序预测与涨跌分析,并集成DeepSeek API提供智能解读。同时,项目深度结合华为云CodeArts(码道)的代码智能体能力,实现代码一键推送至云端代码仓库,建立起高效、可协作的团队开发新范式。开发者可快速上手,从零打造功能完整的个股筛选、智能分析与风险管控产品。
回顾中 -
华为云码道全新升级,多会话并行与多智能体协作2026/05/08 周五 19:00-21:00
王一男-华为云码道产品专家;张嘉冉-华为云码道工程师;胡琦-华为云HCDE;程诗杰-华为云HCDG
华为云码道4月份版本全新升级,此次直播深度解读4月份产品特性,通过“特性解读+实操演示+实战案例+设计创新”的组合,全方位展现码道在多会话并行与多智能体协作方面的能力,赋能开发者提升效率
正在直播
热门标签