上一页 1 2 3 4 5 6 7 8 9 ··· 26 下一页
摘要: 原题链接在这里:https://leetcode.com/problems/swapping-nodes-in-a-linked-list/ 题目: You are given the head of a linked list, and an integer k. Return the head 阅读全文
posted @ 2022-06-16 03:18 Dylan_Java_NYC 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list/ 题目: In a linked list of size n, where n is even, the ith node (0-indexed) of 阅读全文
posted @ 2022-06-15 14:32 Dylan_Java_NYC 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/k-radius-subarray-averages/ 题目: You are given a 0-indexed array nums of n integers, and an integer k. The k-radi 阅读全文
posted @ 2022-06-15 11:59 Dylan_Java_NYC 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero/ 题目: You are given an integer array nums and an integer x. In one operati 阅读全文
posted @ 2022-06-14 15:05 Dylan_Java_NYC 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/find-a-peak-element-ii/ 题目: A peak element in a 2D grid is an element that is strictly greater than all of its a 阅读全文
posted @ 2022-06-10 14:31 Dylan_Java_NYC 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/ip-to-cidr/ 题目: An IP address is a formatted 32-bit unsigned integer where each group of 8 bits is printed as a 阅读全文
posted @ 2022-06-08 14:15 Dylan_Java_NYC 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/remove-vowels-from-a-string/ 题目: Given a string s, remove the vowels 'a', 'e', 'i', 'o', and 'u' from it, and re 阅读全文
posted @ 2022-05-20 12:48 Dylan_Java_NYC 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/count-sub-islands/ 题目: You are given two m x n binary matrices grid1 and grid2 containing only 0's (representing 阅读全文
posted @ 2022-05-16 06:56 Dylan_Java_NYC 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/minimum-insertions-to-balance-a-parentheses-string/ 题目: Given a parentheses string s containing only the charact 阅读全文
posted @ 2022-05-01 06:30 Dylan_Java_NYC 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/minimum-number-of-swaps-to-make-the-string-balanced/ 题目: You are given a 0-indexed string s of even length n. Th 阅读全文
posted @ 2022-05-01 05:52 Dylan_Java_NYC 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/ 题目: You are given the head of a linked list. Delete the middle node, an 阅读全文
posted @ 2022-04-26 11:13 Dylan_Java_NYC 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree-iv/ 题目: Given the root of a binary tree and an array of TreeNode objects 阅读全文
posted @ 2022-04-24 11:24 Dylan_Java_NYC 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree-iii/ 题目: Given two nodes of a binary tree p and q, return their lowest c 阅读全文
posted @ 2022-04-24 10:22 Dylan_Java_NYC 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree-ii/ 题目: Given the root of a binary tree, return the lowest common ancest 阅读全文
posted @ 2022-04-24 07:08 Dylan_Java_NYC 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/iterator-for-combination/ 题目: Design the CombinationIterator class: CombinationIterator(string characters, int c 阅读全文
posted @ 2021-03-07 13:25 Dylan_Java_NYC 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/prefix-and-suffix-search/ 题目: Design a special dictionary which has some words and allows you to search the word 阅读全文
posted @ 2021-03-05 15:06 Dylan_Java_NYC 阅读(161) 评论(0) 推荐(0) 编辑
摘要: JavaScipt Stack declear: []. pop an empty stack in JavaScipt return undefined 阅读全文
posted @ 2020-05-05 11:12 Dylan_Java_NYC 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/rotate-string/ 题目: We are given two strings, A and B. A shift on A consists of taking string A and moving the le 阅读全文
posted @ 2020-03-21 14:10 Dylan_Java_NYC 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/flower-planting-with-no-adjacent/ 题目: You have N gardens, labelled 1 to N. In each garden, you want to plant one 阅读全文
posted @ 2020-03-21 13:49 Dylan_Java_NYC 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/implement-rand10-using-rand7/ 题目: Given a function rand7 which generates a uniform random integer in the range 1 阅读全文
posted @ 2020-03-21 07:24 Dylan_Java_NYC 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/count-different-palindromic-subsequences/ 题目: Given a string S, find the number of different non-empty palindrom 阅读全文
posted @ 2020-03-20 14:23 Dylan_Java_NYC 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/validate-stack-sequences/ 题目: Given two sequences pushed and popped with distinct values, return true if and onl 阅读全文
posted @ 2020-03-09 10:21 Dylan_Java_NYC 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/product-of-the-last-k-numbers/ 题目: Implement the class ProductOfNumbers that supports two methods: 1. add(int nu 阅读全文
posted @ 2020-03-08 15:19 Dylan_Java_NYC 阅读(648) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/flip-string-to-monotone-increasing/ 题目: A string of '0's and '1's is monotone increasing if it consists of some 阅读全文
posted @ 2020-03-08 14:17 Dylan_Java_NYC 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/shortest-path-in-a-grid-with-obstacles-elimination/ 题目: Given a m * n grid, where each cell is either 0 (empty)  阅读全文
posted @ 2020-03-08 08:16 Dylan_Java_NYC 阅读(1349) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps/ 题目: You have a pointer at index 0 in an array of size 阅读全文
posted @ 2020-03-02 14:04 Dylan_Java_NYC 阅读(470) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/similar-string-groups/ 题目: Two strings X and Y are similar if we can swap two letters (in different positions) o 阅读全文
posted @ 2020-03-02 12:43 Dylan_Java_NYC 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/confusing-number-ii/ 题目: We can rotate digits by 180 degrees to form new digits. When 0, 1, 6, 8, 9 are rotated 阅读全文
posted @ 2020-02-29 13:14 Dylan_Java_NYC 阅读(1309) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/confusing-number/ 题目: Given a number N, return true if and only if it is a confusing number, which satisfies the 阅读全文
posted @ 2020-02-29 12:29 Dylan_Java_NYC 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/string-transforms-into-another-string/ 题目: Given two strings str1 and str2 of the same length, determine whether 阅读全文
posted @ 2020-02-29 12:10 Dylan_Java_NYC 阅读(2980) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/parallel-courses/ 题目: There are N courses, labelled from 1 to N. We are given relations[i] = [X, Y], representin 阅读全文
posted @ 2020-02-27 13:58 Dylan_Java_NYC 阅读(695) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/tree-diameter/ 题目: Given an undirected tree, return its diameter: the number of edges in a longest path in that 阅读全文
posted @ 2020-02-26 08:09 Dylan_Java_NYC 阅读(1442) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/analyze-user-website-visit-pattern/ 题目: We are given some website visits: the user with name username[i] visited 阅读全文
posted @ 2020-02-24 12:08 Dylan_Java_NYC 阅读(5070) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/dice-roll-simulation/ 题目: A die simulator generates a random number from 1 to 6 for each roll. You introduced a 阅读全文
posted @ 2020-02-18 14:04 Dylan_Java_NYC 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/sort-an-array/ 题目: Given an array of integers nums, sort the array in ascending order. Example 1: Input: nums = 阅读全文
posted @ 2020-02-18 11:38 Dylan_Java_NYC 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/cousins-in-binary-tree/ 题目: In a binary tree, the root node is at depth 0, and children of each depth k node are 阅读全文
posted @ 2020-02-18 11:15 Dylan_Java_NYC 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/ 题目: Given a string S of lowercase letters, a duplicate removal consist 阅读全文
posted @ 2020-02-18 10:33 Dylan_Java_NYC 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/elimination-game/ 题目: There is a list of sorted integers from 1 to n. Starting from left to right, remove the fi 阅读全文
posted @ 2020-02-18 06:56 Dylan_Java_NYC 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii/ 题目: Given a string s, a k duplicate removal consists of choosing k  阅读全文
posted @ 2020-02-18 06:37 Dylan_Java_NYC 阅读(596) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/all-paths-from-source-to-target/ 题目: Given a directed, acyclic graph of N nodes. Find all possible paths from no 阅读全文
posted @ 2020-02-18 05:55 Dylan_Java_NYC 阅读(363) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 26 下一页