文章 2022-02-16 来自:开发者社区

​LeetCode刷题实战508:出现次数最多的子树元素和

今天和大家聊的问题叫做 出现次数最多的子树元素和,我们先来看题面:https://leetcode-cn.com/problems/most-frequent-subtree-sum/Given the root of a binary tree, return the most frequent subtree sum. If there is a tie, return all the va....

​LeetCode刷题实战508:出现次数最多的子树元素和
文章 2022-02-16 来自:开发者社区

​LeetCode刷题实战380:O(1) 时间插入、删除和获取随机元素

今天和大家聊的问题叫做 O(1) 时间插入、删除和获取随机元素,我们先来看题面:https://leetcode-cn.com/problems/insert-delete-getrandom-o1/设计一个支持在平均 时间复杂度 O(1) 下,执行以下操作的数据结构。insert(val):当元素 val 不存在时,向集合中插入该项。remove(val):元素 val 存在时,从集合中移除该....

​LeetCode刷题实战380:O(1) 时间插入、删除和获取随机元素
文章 2022-02-16 来自:开发者社区

​LeetCode刷题实战378:有序矩阵中第 K 小的元素

今天和大家聊的问题叫做 有序矩阵中第 K 小的元素,我们先来看题面:https://leetcode-cn.com/problems/kth-smallest-element-in-a-sorted-matrix/Given an n x n matrix where each of the rows and columns are sorted in ascending order, retu....

文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战220:存在重复元素 III

今天和大家聊的问题叫做 存在重复元素 III,我们先来看题面:https://leetcode-cn.com/problems/contains-duplicate-iii/Given an integer array nums and two integers k and t, return true if there are two distinct indices i and j in t....

文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战219:存在重复元素 II

今天和大家聊的问题叫做 存在重复元素 II,我们先来看题面:https://leetcode-cn.com/problems/contains-duplicate-ii/Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array s....

文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战217:存在重复元素

今天和大家聊的问题叫做 存在重复元素,我们先来看题面:https://leetcode-cn.com/problems/contains-duplicate/Given an integer array nums, return true if any value appears at least twice in the array, and return false if every ele....

文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战215:数组中的第K个最大元素

今天和大家聊的问题叫做 数组中的第K个最大元素,我们先来看题面:https://leetcode-cn.com/problems/kth-largest-element-in-an-array/Given an integer array nums and an integer k, return the kth largest element in the array.Note that it....

文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战203:移除链表元素

今天和大家聊的问题叫做 移除链表元素,我们先来看题面:https://leetcode-cn.com/problems/remove-linked-list-elements/Remove all elements from a linked list of integers that have value val.题意删除链表中等于给定值 val 的所有节点。示例输入: 1->2->...

文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战83: 删除排序链表中的重复元素

今天和大家聊的问题叫做 删除排序链表中的重复元素,我们先来看题面:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list/Given a sorted linked list, delete all duplicates such that each element appear only once.题意给定一个排序....

文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战34:在排序数组中查找元素的第一个和最后一个位置

今天和大家聊的问题叫做在排序数组中查找元素的第一个和最后一个位置,我们先来看题面:https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-arrayGiven an array of integers nums sorted in ascending order, find the st....

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

算法编程

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

+关注
AI助理
登录插画

登录以查看您的控制台资源

管理云资源
状态一览
快捷访问

你好,我是AI助理

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