02 2020 档案
摘要:原题链接在这里: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
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/confusing-number/ 题目: Given a number N, return true if and only if it is a confusing number, which satisfies the
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/string-transforms-into-another-string/ 题目: Given two strings str1 and str2 of the same length, determine whether
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/parallel-courses/ 题目: There are N courses, labelled from 1 to N. We are given relations[i] = [X, Y], representin
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/tree-diameter/ 题目: Given an undirected tree, return its diameter: the number of edges in a longest path in that
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/analyze-user-website-visit-pattern/ 题目: We are given some website visits: the user with name username[i] visited
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/dice-roll-simulation/ 题目: A die simulator generates a random number from 1 to 6 for each roll. You introduced a
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/sort-an-array/ 题目: Given an array of integers nums, sort the array in ascending order. Example 1: Input: nums =
阅读全文
摘要:原题链接在这里: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
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/ 题目: Given a string S of lowercase letters, a duplicate removal consist
阅读全文
摘要:原题链接在这里: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
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii/ 题目: Given a string s, a k duplicate removal consists of choosing k
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/all-paths-from-source-to-target/ 题目: Given a directed, acyclic graph of N nodes. Find all possible paths from no
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/two-city-scheduling/ 题目: There are 2N people a company is planning to interview. The cost of flying the i-th per
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/invalid-transactions/ 题目: A transaction is possibly invalid if: the amount exceeds $1000, or; if it occurs withi
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/building-h2o/ 题目: There are two kinds of threads, oxygen and hydrogen. Your goal is to group these threads to fo
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/design-bounded-blocking-queue/ 题目: Implement a thread safe bounded blocking queue that has the following methods
阅读全文
摘要:floorKey(key), ceilingKey(key) 是包含key在内的上线下线 lowerKey(key), higherKey(key) 是不包含key的上线下线.
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/swim-in-rising-water/ 题目: On an N x N grid, each square grid[i][j] represents the elevation at that point (i,j).
阅读全文