随笔分类 -  leetCode hot 100

摘要:Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: [ ["ate", "eat","tea"], [" 阅读全文
posted @ 2022-11-12 22:01 MarkLeeBYR 阅读(13) 评论(0) 推荐(0) 编辑
摘要:You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means 阅读全文
posted @ 2022-11-07 11:08 MarkLeeBYR 阅读(24) 评论(0) 推荐(0) 编辑
摘要:Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Example 1: Input: nums = [1,2, 阅读全文
posted @ 2022-11-07 09:59 MarkLeeBYR 阅读(29) 评论(0) 推荐(0) 编辑
摘要:You are given a 0-indexed array of integers nums of length n. You are initially positioned at nums[0]. Each element nums[i] represents the maximum len 阅读全文
posted @ 2022-11-06 22:46 MarkLeeBYR 阅读(23) 评论(0) 推荐(0) 编辑
摘要:You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum ju 阅读全文
posted @ 2022-11-06 21:29 MarkLeeBYR 阅读(23) 评论(0) 推荐(0) 编辑
摘要:Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文
posted @ 2022-11-06 20:19 MarkLeeBYR 阅读(16) 评论(0) 推荐(0) 编辑
摘要:Given an unsorted integer array, find the smallest missing positive integer. Example 1: Input: [1,2,0]Output: 3Example 2: Input: [3,4,-1,1]Output: 2Ex 阅读全文
posted @ 2022-11-06 18:11 MarkLeeBYR 阅读(15) 评论(0) 推荐(0) 编辑
摘要:Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums 阅读全文
posted @ 2022-11-06 16:11 MarkLeeBYR 阅读(19) 评论(0) 推荐(0) 编辑
摘要:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2022-11-06 15:47 MarkLeeBYR 阅读(16) 评论(0) 推荐(0) 编辑
摘要:剑指offer:数字在排序数组中出现的次数 https://www.cnblogs.com/MarkLeeBYR/p/9774275.html 阅读全文
posted @ 2022-11-06 15:45 MarkLeeBYR 阅读(7) 评论(0) 推荐(0) 编辑
摘要:Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You a 阅读全文
posted @ 2022-11-06 14:17 MarkLeeBYR 阅读(17) 评论(0) 推荐(0) 编辑
摘要:Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring. Example 1: Inpu 阅读全文
posted @ 2022-11-05 23:19 MarkLeeBYR 阅读(14) 评论(0) 推荐(0) 编辑
摘要:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2022-11-05 21:35 MarkLeeBYR 阅读(16) 评论(0) 推荐(0) 编辑
摘要:Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list. 本题我们可以借助一个Stack来解题。我们从链表头部开始,向Stack中插入k个节点,然 阅读全文
posted @ 2022-11-05 17:29 MarkLeeBYR 阅读(26) 评论(0) 推荐(0) 编辑
摘要:Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your a 阅读全文
posted @ 2022-11-04 09:48 MarkLeeBYR 阅读(9) 评论(0) 推荐(0) 编辑
摘要:You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list 阅读全文
posted @ 2022-11-03 13:26 MarkLeeBYR 阅读(22) 评论(0) 推荐(0) 编辑
摘要:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [ 阅读全文
posted @ 2022-11-03 11:02 MarkLeeBYR 阅读(25) 评论(0) 推荐(0) 编辑
摘要:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. public L 阅读全文
posted @ 2022-11-03 10:41 MarkLeeBYR 阅读(15) 评论(0) 推荐(0) 编辑
摘要:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文
posted @ 2022-11-03 10:14 MarkLeeBYR 阅读(15) 评论(0) 推荐(0) 编辑
摘要:Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After rem 阅读全文
posted @ 2022-11-03 09:46 MarkLeeBYR 阅读(13) 评论(0) 推荐(0) 编辑

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