文章 2023-01-08 来自:开发者社区

LeetCode contest 200 5476. 找出数组游戏的赢家 Find the Winner of an Array Game

LeetCode contest 200 5476. 找出数组游戏的赢家 Find the Winner of an Array GameTable of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版给你一个由 不同 整数组成的整数数组 arr 和一个整数 k 。每回合游戏都在数组的前两个元素(即 arr[0] 和 arr[1] )之间进行。比较 arr[0]....

文章 2023-01-08 来自:开发者社区

LeetCode contest 200 5475. 统计好三元组 Count Good Triplets

LeetCode contest 200 5475. 统计好三元组 Count Good TripletsTable of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版给你一个整数数组 arr ,以及 a、b 、c 三个整数。请你统计其中好三元组的数量。如果三元组 (arr[i], arr[j], arr[k]) 满足下列全部条件,则认为它是一个 好三元组 。....

文章 2023-01-08 来自:开发者社区

LeetCode contest 199 灯泡开关 IV Bulb Switcher IV

LeetCode contest 199 灯泡开关 IV Bulb Switcher IVTable of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版房间中有 n 个灯泡,编号从 0 到 n-1 ,自左向右排成一行。最开始的时候,所有的灯泡都是 关 着的。请你设法使得灯泡的开关状态和 target 描述的状态一致,其中 target[i] 等于 1 第 i ....

文章 2023-01-08 来自:开发者社区

LeetCode contest 190 5418. 二叉树中的伪回文路径 Pseudo-Palindromic Paths in a Binary Tree

LeetCode contest 190 5418. 二叉树中的伪回文路径 Pseudo-Palindromic Paths in a Binary TreeTable of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版给你一棵二叉树,每个节点的值为 1 到 9 。我们称二叉树中的一条路径是 「伪回文」的,当它满足:路径经过的所有节点值的排列中,存在一个回文序....

LeetCode contest 190 5418. 二叉树中的伪回文路径 Pseudo-Palindromic Paths in a Binary Tree
文章 2023-01-08 来自:开发者社区

LeetCode contest 190 5417. 定长子串中元音的最大数目 Maximum Number of Vowels in a Substring of Given Length

LeetCode contest 190 5417. 定长子串中元音的最大数目 Maximum Number of Vowels in a Substring of Given LengthTable of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版给你字符串 s 和整数 k 。请返回字符串 s 中长度为 k 的单个子字符串中可能包含的最大元音字母数。英文中....

文章 2023-01-08 来自:开发者社区

LeetCode contest 190 5416. 检查单词是否为句中其他单词的前缀

LeetCode contest 190 5416. 检查单词是否为句中其他单词的前缀Table of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版给你一个字符串 sentence 作为句子并指定检索词为 searchWord ,其中句子由若干用 单个空格 分隔的单词组成。请你检查检索词 searchWord 是否为句子 sentence 中任意单词的前缀。如....

文章 2023-01-08 来自:开发者社区

LeetCode contest 189 5413. 重新排列句子中的单词

LeetCode contest 189 5413. 重新排列句子中的单词Table of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版「句子」是一个用空格分隔单词的字符串。给你一个满足下述格式的句子 text :句子的首字母大写text 中的每个单词都用单个空格分隔。请你重新排列 text 中的单词,使所有单词按其长度的升序排列。如果两个单词的长度相同,则保....

文章 2023-01-08 来自:开发者社区

LeetCode contest 189 5412. 在既定时间做作业的学生人数

LeetCode contest 189 5412. 在既定时间做作业的学生人数Table of Contents一、中文版二、英文版三、My answer 四、解题报告一、中文版给你两个整数数组 startTime(开始时间)和 endTime(结束时间),并指定一个整数 queryTime 作为查询时间。已知,第 i 名学生在 startTime[i] 时开始写作业并于 endTime[i]....

文章 2023-01-07 来自:开发者社区

LeetCode contest 187 1437. 是否所有 1 都至少相隔 k 个元素 Check If All 1's Are at Least Length K Places Away

LeetCode contest 187 1437. 是否所有 1 都至少相隔 k 个元素 Check If All 1's Are at Least Length K Places AwayTable of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版给你一个由若干 0 和 1 组成的数组nums 以及整数 k。如果所有 1 都至少相隔 k 个元素,则返回 ....

LeetCode contest 187 1437. 是否所有 1 都至少相隔 k 个元素 Check If All 1's Are at Least Length K Places Away
文章 2023-01-07 来自:开发者社区

LeetCode contest 187 1436. 旅行终点站 Destination City

LeetCode contest 187 1436. 旅行终点站 Destination CityTable of Contents一、中文版二、英文版三、My answer四、解题报告一、中文版给你一份旅游线路图,该线路图中的旅行线路用数组 paths 表示,其中 paths[i] = [cityAi, cityBi] 表示该线路将会从 cityAi 直接前往 cityBi 。请你找出这次旅行....

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

算法编程

开发者社区在线编程频道官方技术圈。包含算法资源更新,周赛动态,每日一题互动。

+关注
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等