[LeetCode]Sentence Similarity II
题目描述:LeetCode 737. Sentence Similarity IIGiven two sentences words1, words2 (each represented as an array of strings), and a list of similar word pairs pairs, determine if two sentences are similar.For...
View Article[LeetCode]Daily Temperatures
题目描述:LeetCode 739. Daily TemperaturesGiven a list of daily temperatures, produce a list that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If...
View Article[LeetCode]Monotone Increasing Digits
题目描述:LeetCode 738. Monotone Increasing DigitsGiven a non-negative integer N, find the largest number that is less than or equal to N with monotone increasing digits.(Recall that an integer has monotone...
View Article[LeetCode]Delete and Earn
题目描述:LeetCode 740. Delete and EarnGiven an array nums of integers, you can perform operations on the array.In each operation, you pick any nums[i] and delete it to earn nums[i] points. After, you must...
View Article[LeetCode]Find Smallest Letter Greater Than Target
题目描述:LeetCode 744. Find Smallest Letter Greater Than TargetGiven a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in...
View Article[LeetCode]Network Delay Time
题目描述:LeetCode 743. Network Delay TimeThere are N network nodes, labelled 1 to N.Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v is the target...
View Article[LeetCode]Closest Leaf in a Binary Tree
题目描述:LeetCode 742. Closest Leaf in a Binary TreeGiven a binary tree where every node has a unique value, and a target key k, find the closest leaf node to target k in the tree.A node is called a leaf...
View Article[LeetCode]Prefix and Suffix Search
题目描述:LeetCode 745. Prefix and Suffix SearchGiven many words, words[i] has weight i.Design a class WordFilter that supports one function, WordFilter.f(String prefix, String suffix). It will return the...
View Article[LeetCode]Min Cost Climbing Stairs
题目描述:LeetCode 746. Min Cost Climbing StairsOn a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed).Once you pay the cost, you can either climb one or two steps. You need...
View Article[LeetCode]Shortest Completing Word
题目描述:LeetCode 748. Shortest Completing WordFind the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to complete the given...
View Article[LeetCode]Number Of Corner Rectangles
题目描述:LeetCode 750. Number Of Corner RectanglesGiven a grid where each entry is only 0 or 1, find the number of corner rectangles.A corner rectangle is 4 distinct 1s on the grid that form an...
View Article[LeetCode]Contain Virus
题目描述:LeetCode 749. Contain VirusA virus is spreading rapidly, and your task is to quarantine the infected area by installing walls.The world is modeled as a 2-D array of cells, where 0 represents...
View ArticleLeetCode Weekly Contest 63解题报告
LeetCode Weekly Contest 63是LeetCode举办的第六十七场正式周赛,共4道题目,比赛时长1.5小时。比赛链接:https://leetcode.com/contest/leetcode-weekly-contest-63/题解列表:LeetCode 746. Min Cost Climbing StairsLeetCode 748. Shortest Completing...
View Article[LeetCode]Largest Number Greater Than Twice of Others
题目描述:LeetCode 747. Largest Number Greater Than Twice of OthersIn a given integer array nums, there is always exactly one largest element.Find whether the largest element in the array is at least twice...
View Article[LeetCode]IP to CIDR
题目描述:LeetCode 751. IP to CIDRGiven a start IP address ip and a number of ips we need to cover n, return a representation of the range as a list (of smallest possible length) of CIDR blocks.A CIDR block...
View Article[LeetCode]Open the Lock
题目描述:LeetCode 752. Open the LockYou have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely and wrap...
View Article[LeetCode]Cracking the Safe
题目描述:LeetCode 753. Cracking the SafeThere is a box protected by a password. The password is n digits, where each letter can be one of the first k digits 0, 1, ..., k-1.You can keep inputting the...
View ArticleLeetCode Weekly Contest 64解题报告
LeetCode Weekly Contest 64是LeetCode举办的第六十八场正式周赛,共4道题目,比赛时长1.5小时。比赛链接:https://leetcode.com/contest/leetcode-weekly-contest-64/题解列表:LeetCode 747. Largest Number Greater Than Twice of OthersLeetCode 751....
View Article[LeetCode]Reach a Number
题目描述:LeetCode 755. Reach a NumberYou are standing at position 0 on an infinite number line. There is a goal at position target.On each move, you can either go left or right. During the n-th move...
View Article[LeetCode]Pour Water
题目描述:LeetCode 756. Pour WaterWe are given an elevation map, heights[i] representing the height of the terrain at that index. The width at each index is 1. After V units of water fall at index K, how...
View Article