随笔分类 -  LeetCode(Java)

上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页
摘要:617. Merge Two Binary Trees(合并二叉树) 链接 https://leetcode cn.com/problems/merge two binary trees 题目 给定两个二叉树,想象当你将它们中的一个覆盖到另一个上时,两个二叉树的一些节点便会重叠。 你需要将他们合并为 阅读全文
posted @ 2020-03-13 22:26 cheng102e 阅读(90) 评论(0) 推荐(0)
摘要:226. Invert Binary Tree(翻转二叉树) title: LeetCode 226. Invert Binary Tree date: 2022-04-09 10:36:00 tags: categories: LeetCode LeetCode 226. Invert Binar 阅读全文
posted @ 2020-03-13 19:59 cheng102e 阅读(104) 评论(0) 推荐(0)
摘要:LeetCode 101. Symmetric Tree (对称二叉树) 题目 链接 https://leetcode-cn.com/problems/symmetric-tree 问题描述 给定一个二叉树,检查它是否是镜像对称的。 例如,二叉树 [1,2,2,3,4,4,3] 是对称的。 示例 输 阅读全文
posted @ 2020-03-13 15:15 cheng102e 阅读(102) 评论(0) 推荐(0)
摘要:LeetCode 21. Merge Two Sorted Lists (合并两个有序链表) 题目 链接 https://leetcode-cn.com/problems/merge-two-sorted-lists/ 问题描述 将两个有序链表合并为一个新的有序链表并返回。新链表是通过拼接给定的两个 阅读全文
posted @ 2020-03-13 14:52 cheng102e 阅读(101) 评论(0) 推荐(0)
摘要:1071. Greatest Common Divisor of Strings(字符串的最大公因子) 链接 https://leetcode cn.com/problems/greatest common divisor of strings 题目 对于字符串 S 和 T,只有在 S = T + 阅读全文
posted @ 2020-03-12 11:50 cheng102e 阅读(159) 评论(0) 推荐(0)
摘要:1013. Partition Array Into Three Parts With Equal Sum(将数组分成和相等的三个部分) 链接 https://leetcode cn.com/problems/partition array into three parts with equal s 阅读全文
posted @ 2020-03-11 10:13 cheng102e 阅读(201) 评论(0) 推荐(0)
摘要:LeetCode 322. Coin Change(零钱兑换) 题目 链接 https://leetcode-cn.com/problems/coin-change 问题描述 给定不同面额的硬币 coins 和一个总金额 amount。编写一个函数来计算可以凑成总金额所需的最少的硬币个数。如果没有任 阅读全文
posted @ 2020-03-08 22:08 cheng102e 阅读(200) 评论(0) 推荐(0)
摘要:213. House Robber II(打家劫舍 II) 链接 https://leetcode cn.com/problems/house robber ii 题目 你是一个专业的小偷,计划偷窃沿街的房屋,每间房内都藏有一定的现金。这个地方所有的房屋都围成一圈,这意味着第一个房屋和最后一个房屋是 阅读全文
posted @ 2020-02-27 18:24 cheng102e 阅读(93) 评论(0) 推荐(0)
摘要:198. House Robber(打家劫舍) 链接 https://leetcode cn.com/problems/house robber 题目 你是一个专业的小偷,计划偷窃沿街的房屋。每间房内都藏有一定的现金,影响你偷窃的唯一制约因素就是相邻的房屋装有相互连通的防盗系统,如果两间相邻的房屋在 阅读全文
posted @ 2020-02-27 18:02 cheng102e 阅读(93) 评论(0) 推荐(0)
摘要:LeetCode 303. Range Sum Query - Immutable (区域和检索 - 数组不可变) 题目 链接 https://leetcode-cn.com/problems/range-sum-query-immutable 问题描述 给定一个整数数组 nums,处理以下类型的多 阅读全文
posted @ 2020-02-27 17:29 cheng102e 阅读(107) 评论(0) 推荐(0)
摘要:746. Min Cost Climbing Stairs (使用最小花费爬楼梯) 链接 https://leetcode cn.com/problems/min cost climbing stairs 题目 数组的每个索引做为一个阶梯,第 i个阶梯对应着一个非负数的体力花费值 cost "i" 阅读全文
posted @ 2020-02-27 12:13 cheng102e 阅读(100) 评论(0) 推荐(0)
摘要:209. Minimum Size Subarray Sum(无重复字符的最长子串) 链接 https://leetcode-cn.com/problems/minimum-size-subarray-sum 题目 给定一个含有 n 个正整数的数组和一个正整数 s ,找出该数组中满足其和 ≥ s 的 阅读全文
posted @ 2020-02-17 20:50 cheng102e 阅读(110) 评论(0) 推荐(0)
摘要:LeetCode 3. Longest Substring Without Repeating Characters (无重复字符的最长子串) 题目 链接 https://leetcode-cn.com/problems/longest-substring-without-repeating-cha 阅读全文
posted @ 2020-02-17 20:45 cheng102e 阅读(83) 评论(0) 推荐(0)
摘要:11. Container With Most Water(反转字符串中的元音字母) 链接 https://leetcode cn.com/problems/container with most water 题目 给定 n 个非负整数 a1,a2,...,an,每个数代表坐标中的一个点 (i, a 阅读全文
posted @ 2020-02-16 14:35 cheng102e 阅读(112) 评论(0) 推荐(0)
摘要:345. Reverse Vowels of a String(反转字符串中的元音字母) 链接 https://leetcode cn.com/problems/reverse vowels of a string 题目 编写一个函数,以字符串作为输入,反转该字符串中的元音字母。 示例 1: 输入: 阅读全文
posted @ 2020-02-16 14:00 cheng102e 阅读(127) 评论(0) 推荐(0)
摘要:344. Reverse String(反转字符串) 链接 https://leetcode cn.com/problems/reverse string 题目 编写一个函数,其作用是将输入的字符串反转过来。输入字符串以字符数组 char[] 的形式给出。 不要给另外的数组分配额外的空间,你必须原地 阅读全文
posted @ 2020-02-16 13:12 cheng102e 阅读(102) 评论(0) 推荐(0)
摘要:215. Kth Largest Element in an Array(数组中的第K个最大元素) 链接 https://leetcode cn.com/problems/kth largest element in an array 题目 在未排序的数组中找到第 k 个最大的元素。请注意,你需要找 阅读全文
posted @ 2020-02-16 12:59 cheng102e 阅读(103) 评论(0) 推荐(0)
摘要:88. Merge Sorted Array(合并两个有序数组) 链接 https://leetcode cn.com/problems/merge sorted array 题目 给定两个有序整数数组 nums1 和 nums2,将 nums2 合并到 nums1 中,使得 num1 成为一个有序 阅读全文
posted @ 2020-02-14 22:43 cheng102e 阅读(99) 评论(0) 推荐(0)
摘要:75. Sort Colors(颜色分类) 链接 https://leetcode cn.com/problems/sort colors 题目 给定一个包含红色、白色和蓝色,一共 n 个元素的数组,原地对它们进行排序,使得相同颜色的元素相邻,并按照红色、白色、蓝色顺序排列。 此题中,我们使用整数 阅读全文
posted @ 2020-02-14 20:49 cheng102e 阅读(89) 评论(0) 推荐(0)
摘要:581. Shortest Unsorted Continuous Subarray(最短无序连续子数组) 链接 https://leetcode cn.com/problems/shortest unsorted continuous subarray 题目 给定一个整数数组,你需要寻找一个连续的 阅读全文
posted @ 2020-02-12 11:21 cheng102e 阅读(97) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页