随笔分类 -  leetCode hot 100

摘要:https://www.cnblogs.com/MarkLeeBYR/p/17166229.html 阅读全文
posted @ 2023-03-16 17:46 MarkLeeBYR 阅读(9) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both 阅读全文
posted @ 2023-03-16 17:22 MarkLeeBYR 阅读(13) 评论(0) 推荐(0) 编辑
摘要:Given an unsorted array of integers, find the number of longest increasing subsequence. Example 1: Input: [1,3,5,4,7] Output: 2 Explanation: The two l 阅读全文
posted @ 2022-12-13 00:23 MarkLeeBYR 阅读(12) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty array of integers, return the k most frequent elements. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input 阅读全文
posted @ 2022-12-02 11:34 MarkLeeBYR 阅读(14) 评论(0) 推荐(0) 编辑
摘要:Example 1: Input: coins = [1,2,5], amount = 11 Output: 3 Explanation: 11 = 5 + 5 + 1 Example 2: Input: coins = [2], amount = 3 Output: -1 Example 3: I 阅读全文
posted @ 2022-12-02 10:37 MarkLeeBYR 阅读(14) 评论(0) 推荐(0) 编辑
摘要:Given an integer array nums, return the length of the longest strictly increasing subsequence. Example 1: Input: nums = [10,9,2,5,3,7,101,18] Output: 阅读全文
posted @ 2022-11-30 10:30 MarkLeeBYR 阅读(13) 评论(0) 推荐(0) 编辑
摘要:剑指offer https://www.cnblogs.com/MarkLeeBYR/p/9773495.html 阅读全文
posted @ 2022-11-30 09:59 MarkLeeBYR 阅读(8) 评论(0) 推荐(0) 编辑
摘要:剑指offer 数组中的重复数字 https://www.cnblogs.com/MarkLeeBYR/p/9773954.html 阅读全文
posted @ 2022-11-30 09:44 MarkLeeBYR 阅读(3) 评论(0) 推荐(0) 编辑
摘要:Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv 阅读全文
posted @ 2022-11-29 10:01 MarkLeeBYR 阅读(10) 评论(0) 推荐(0) 编辑
摘要:Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. For example, given n = 12, 阅读全文
posted @ 2022-11-29 09:44 MarkLeeBYR 阅读(7) 评论(0) 推荐(0) 编辑
摘要:剑指offer 二维数组的查找 https://www.cnblogs.com/MarkLeeBYR/p/9777341.html 阅读全文
posted @ 2022-11-29 00:07 MarkLeeBYR 阅读(8) 评论(0) 推荐(0) 编辑
摘要:剑指offer 构建乘积数组 https://www.cnblogs.com/MarkLeeBYR/p/9773723.html 阅读全文
posted @ 2022-11-27 23:58 MarkLeeBYR 阅读(5) 评论(0) 推荐(0) 编辑
摘要:给定一个二叉树和所要查找的两个节点,找到两个节点的最近公共父亲节点(LCA)。比如,节点5和1的LCA是3,节点5和4的LCA是5。 class Solution { public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, Tr 阅读全文
posted @ 2022-11-27 23:34 MarkLeeBYR 阅读(20) 评论(0) 推荐(0) 编辑
摘要:Example 1: Input: head = [1,2,2,1] Output: true Example 2: Input: head = [1,2] Output: false public boolean isPalindrome(ListNode head) { ListNode mid 阅读全文
posted @ 2022-11-27 16:59 MarkLeeBYR 阅读(17) 评论(0) 推荐(0) 编辑
摘要:剑指offer 二叉搜索树的第k个节点 https://www.cnblogs.com/MarkLeeBYR/p/9773509.html 阅读全文
posted @ 2022-11-27 16:47 MarkLeeBYR 阅读(9) 评论(0) 推荐(0) 编辑
摘要:剑指offer https://www.cnblogs.com/MarkLeeBYR/p/9776556.html 阅读全文
posted @ 2022-11-27 16:42 MarkLeeBYR 阅读(13) 评论(0) 推荐(0) 编辑
摘要:参考剑指offer 最小的k个数字 https://www.cnblogs.com/MarkLeeBYR/p/9775091.html 阅读全文
posted @ 2022-11-24 14:42 MarkLeeBYR 阅读(8) 评论(0) 推荐(0) 编辑
摘要:Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. class TrieNode 阅读全文
posted @ 2022-11-24 10:58 MarkLeeBYR 阅读(13) 评论(0) 推荐(0) 编辑
摘要:剑指offer 反转链表 https://www.cnblogs.com/MarkLeeBYR/p/9773053.html 阅读全文
posted @ 2022-11-24 10:41 MarkLeeBYR 阅读(8) 评论(0) 推荐(0) 编辑
摘要:Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by wa 阅读全文
posted @ 2022-11-24 10:19 MarkLeeBYR 阅读(15) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示