- 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;...
- 1、题目 You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the la... 1、题目 You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the la...
- 1、题目 Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digit... 1、题目 Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digit...
- 1、题目 Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11... 1、题目 Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11...
- 1、问题 求两个字符串的最大子序列 1)、子序列和子字符串有区别,子字符串(子串)必须连续,列如 s1 = "ABCDAB" s2= "BBCDAAB" s1和s2最大子序列有"BCDA","BCDB", "CDAB","ABAB","BCAB"...,子序列BCDA是s1和s2的一个LCS s1和s2最大子字符串是... 1、问题 求两个字符串的最大子序列 1)、子序列和子字符串有区别,子字符串(子串)必须连续,列如 s1 = "ABCDAB" s2= "BBCDAAB" s1和s2最大子序列有"BCDA","BCDB", "CDAB","ABAB","BCAB"...,子序列BCDA是s1和s2的一个LCS s1和s2最大子字符串是...
- 1 问题 打印链表倒数第K个节点值。 2 代码实现 #include<stdio.h> //定义一个Node结构体,里面包含了value值和保存了下一个Node的指针(地址)typed... 1 问题 打印链表倒数第K个节点值。 2 代码实现 #include<stdio.h> //定义一个Node结构体,里面包含了value值和保存了下一个Node的指针(地址)typed...
- 1、题目 Implement int sqrt(int x). Compute and return the square root of x. Subscribe to see which companies asked this question. 2、代码实现 public class... 1、题目 Implement int sqrt(int x). Compute and return the square root of x. Subscribe to see which companies asked this question. 2、代码实现 public class...
- 题目:给定一个字符串str,求其中全部数字串所代表的数字之和 要求: 1、忽略小数点字符,例如“A1.3”,其中包括2个数字1和3 &nb... 题目:给定一个字符串str,求其中全部数字串所代表的数字之和 要求: 1、忽略小数点字符,例如“A1.3”,其中包括2个数字1和3 &nb...
- 1 问题 数组中有一个数字出现了次数超过数组长度的一半,请找出这个数字。 比如{1,2,3,2,2,2,5,4,2},我们知道这个数是2 2 分析 我们数组元素个数分为单数和双数 1)数组长度是单数的情况下 我们有5个元素,里面至少3个2,还有2个元素我们可能重复也可能不重复 我们可以定义一个计数为... 1 问题 数组中有一个数字出现了次数超过数组长度的一半,请找出这个数字。 比如{1,2,3,2,2,2,5,4,2},我们知道这个数是2 2 分析 我们数组元素个数分为单数和双数 1)数组长度是单数的情况下 我们有5个元素,里面至少3个2,还有2个元素我们可能重复也可能不重复 我们可以定义一个计数为...
- 本文目录 什么是BitmapBitmap格式它是如何存储每个像素点的如何进行压缩防止OOM 创建BitmapBitmapFactory创建BitmapFactory.Options参数详解 直接通过Bitmap创建 什么是Bitmap Bitmap是绘图中非常重要的概念,在我们前面自定义的所有View中,他们的画布Canvas说到底都其实是Bit... 本文目录 什么是BitmapBitmap格式它是如何存储每个像素点的如何进行压缩防止OOM 创建BitmapBitmapFactory创建BitmapFactory.Options参数详解 直接通过Bitmap创建 什么是Bitmap Bitmap是绘图中非常重要的概念,在我们前面自定义的所有View中,他们的画布Canvas说到底都其实是Bit...
上滑加载中
推荐直播
-
HDC深度解读系列 - Serverless与MCP融合创新,构建AI应用全新智能中枢2025/08/20 周三 16:30-18:00
张昆鹏 HCDG北京核心组代表
HDC2025期间,华为云展示了Serverless与MCP融合创新的解决方案,本期访谈直播,由华为云开发者专家(HCDE)兼华为云开发者社区组织HCDG北京核心组代表张鹏先生主持,华为云PaaS服务产品部 Serverless总监Ewen为大家深度解读华为云Serverless与MCP如何融合构建AI应用全新智能中枢
回顾中 -
关于RISC-V生态发展的思考2025/09/02 周二 17:00-18:00
中国科学院计算技术研究所副所长包云岗教授
中科院包云岗老师将在本次直播中,探讨处理器生态的关键要素及其联系,分享过去几年推动RISC-V生态建设实践过程中的经验与教训。
回顾中 -
一键搞定华为云万级资源,3步轻松管理企业成本2025/09/09 周二 15:00-16:00
阿言 华为云交易产品经理
本直播重点介绍如何一键续费万级资源,3步轻松管理成本,帮助提升日常管理效率!
回顾中
热门标签