草庐IT

sum_digits

全部标签

The Digital Journey of Microsoft AI & IoT Insider Lab and Partners

Digitaltransformationisnotaone-dayprocess.Inthisarticle,weinvitedAngieZhu,GeneralManagerofMicrosoftAI&IoTInsiderLab,torevealthethinkingandlogicbehindthejointeffortsoftechnologygiantsandtrendsettingstartupsinthepost-epidemiceratoseizethefirstopportunityofthedigitalizationwave.Wehaveenteredaneweraofdi

The Digital Journey of Microsoft AI & IoT Insider Lab and Partners

Digitaltransformationisnotaone-dayprocess.Inthisarticle,weinvitedAngieZhu,GeneralManagerofMicrosoftAI&IoTInsiderLab,torevealthethinkingandlogicbehindthejointeffortsoftechnologygiantsandtrendsettingstartupsinthepost-epidemiceratoseizethefirstopportunityofthedigitalizationwave.Wehaveenteredaneweraofdi

Meet Yang Dong from Unity: A Fully Fledged Digital Human Could Be Created with Gaming Engine

InablogpostonApril13,UnityannouncedthatUnity2021LTSisavailabletodownloadanduse,drawingtheattentionofalargenumberofgamedevelopers.Inparallelwiththeriseofthemetaverse,theuseofdigitalhumanssuchas"LiuYexi"and"AYAYI"isalsoincreasingrapidlyinChina,makingitahighlyattractivemarketforinvestors.Atthemoment,th

Meet Yang Dong from Unity: A Fully Fledged Digital Human Could Be Created with Gaming Engine

InablogpostonApril13,UnityannouncedthatUnity2021LTSisavailabletodownloadanduse,drawingtheattentionofalargenumberofgamedevelopers.Inparallelwiththeriseofthemetaverse,theuseofdigitalhumanssuchas"LiuYexi"and"AYAYI"isalsoincreasingrapidlyinChina,makingitahighlyattractivemarketforinvestors.Atthemoment,th

leetcode 560. Subarray Sum Equals K 和为 K 的子数组(中等)

一、题目大意https://leetcode.cn/problems/subarray-sum-equals-k给你一个整数数组nums和一个整数k,请你统计并返回该数组中和为k的连续子数组的个数。示例1:输入:nums=[1,1,1],k=2输出:2示例2:输入:nums=[1,2,3],k=3输出:2提示:1-1000-107二、解题思路三个思路,第一个:三层遍历,遍历i从0到n,第二层遍历j从i到n,第三层遍历i-j,求和,这种方法会超时第二个:求累加和sum[i]=num[0]-num[i-1],这样二层遍历得到(i,j),检查sum[j]-sum[i]第三个:定义一个hash来保存s

leetcode 560. Subarray Sum Equals K 和为 K 的子数组(中等)

一、题目大意https://leetcode.cn/problems/subarray-sum-equals-k给你一个整数数组nums和一个整数k,请你统计并返回该数组中和为k的连续子数组的个数。示例1:输入:nums=[1,1,1],k=2输出:2示例2:输入:nums=[1,2,3],k=3输出:2提示:1-1000-107二、解题思路三个思路,第一个:三层遍历,遍历i从0到n,第二层遍历j从i到n,第三层遍历i-j,求和,这种方法会超时第二个:求累加和sum[i]=num[0]-num[i-1],这样二层遍历得到(i,j),检查sum[j]-sum[i]第三个:定义一个hash来保存s

leetcode 15. 3Sum 三数之和(中等)

一、题目大意给你一个整数数组nums,判断是否存在三元组[nums[i],nums[j],nums[k]]满足i!=j、i!=k且j!=k,同时还满足nums[i]+nums[j]+nums[k]==0。请你返回所有和为0且不重复的三元组。注意:答案中不可以包含重复的三元组。示例1:输入:nums=[-1,0,1,2,-1,-4]输出:[[-1,-1,2],[-1,0,1]]解释:nums[0]+nums[1]+nums[2]=(-1)+0+1=0。nums[1]+nums[2]+nums[4]=0+1+(-1)=0。nums[0]+nums[3]+nums[4]=(-1)+2+(-1)=0。

leetcode 303. Range Sum Query - Immutable 区域和检索 - 数组不可变(简单)

一、题目大意https://leetcode.cn/problems/range-sum-query-immutable给定一个整数数组 nums,处理以下类型的多个查询:计算索引 left 和 right (包含left和right)之间的nums元素的和,其中 left实现NumArray类:NumArray(int[]nums)使用数组nums初始化对象intsumRange(inti,intj)返回数组nums 中索引 left 和 right 之间的元素的总和,包含 left 和 right 两点(也就是 nums[left]+nums[left+1]+...+nums[right]

leetcode 15. 3Sum 三数之和(中等)

一、题目大意给你一个整数数组nums,判断是否存在三元组[nums[i],nums[j],nums[k]]满足i!=j、i!=k且j!=k,同时还满足nums[i]+nums[j]+nums[k]==0。请你返回所有和为0且不重复的三元组。注意:答案中不可以包含重复的三元组。示例1:输入:nums=[-1,0,1,2,-1,-4]输出:[[-1,-1,2],[-1,0,1]]解释:nums[0]+nums[1]+nums[2]=(-1)+0+1=0。nums[1]+nums[2]+nums[4]=0+1+(-1)=0。nums[0]+nums[3]+nums[4]=(-1)+2+(-1)=0。

leetcode 303. Range Sum Query - Immutable 区域和检索 - 数组不可变(简单)

一、题目大意https://leetcode.cn/problems/range-sum-query-immutable给定一个整数数组 nums,处理以下类型的多个查询:计算索引 left 和 right (包含left和right)之间的nums元素的和,其中 left实现NumArray类:NumArray(int[]nums)使用数组nums初始化对象intsumRange(inti,intj)返回数组nums 中索引 left 和 right 之间的元素的总和,包含 left 和 right 两点(也就是 nums[left]+nums[left+1]+...+nums[right]