Quantcast
Channel: 书影 - Entries for the tag leetcode
Browsing all 559 articles
Browse latest View live

[LeetCode]Accounts Merge

题目描述:LeetCode 721. Accounts MergeGiven a list accounts, each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are emails...

View Article


[LeetCode]Remove Comments

题目描述:LeetCode 722. Remove CommentsGiven a C++ program, remove comments from it. The program source is an array where source[i] is the i-th line of the source code. This represents the result of...

View Article


Image may be NSFW.
Clik here to view.

[LeetCode]Candy Crush

题目描述:LeetCode 723. Candy CrushThis question is about implementing a basic elimination algorithm for Candy Crush.Given a 2D integer array board representing the grid of candy, different positive...

View Article

LeetCode Weekly Contest 57解题报告

LeetCode Weekly Contest 57是LeetCode举办的第六十一场正式周赛,共4道题目,比赛时长1.5小时。比赛链接:https://leetcode.com/contest/leetcode-weekly-contest-57/题解列表:LeetCode 720. Longest Word in DictionaryLeetCode 721. Accounts...

View Article

[LeetCode]Find Pivot Index

题目描述:LeetCode 724. Find Pivot IndexGiven an array of integers nums, write a method that returns the "pivot" index of this array.We define the pivot index as the index where the sum of the numbers to...

View Article


[LeetCode]Split Linked List in Parts

题目描述:LeetCode 725. Split Linked List in PartsGiven a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list "parts".The length of each part...

View Article

[LeetCode]Number of Atoms

题目描述:LeetCode 726. Number of AtomsGiven a chemical formula (given as a string), return the count of each atom.An atomic element always starts with an uppercase character, then zero or more lowercase...

View Article

[LeetCode]Minimum Window Subsequence

题目描述:LeetCode 727. Minimum Window SubsequenceGiven strings S and T, find the minimum (contiguous) substringW of S, so that T is a subsequence of W.If there is no such window in S that covers all...

View Article


LeetCode Weekly Contest 58解题报告

LeetCode Weekly Contest 58是LeetCode举办的第六十二场正式周赛,共4道题目,比赛时长1.5小时。比赛链接:https://leetcode.com/contest/leetcode-weekly-contest-58/题解列表:LeetCode 724. Find Pivot IndexLeetCode 725. Split Linked List in...

View Article


[LeetCode]Self Dividing Numbers

题目描述:LeetCode 728. Self Dividing NumbersA self-dividing number is a number that is divisible by every digit it contains.For example, 128 is a self-dividing number because 128 % 1 == 0, 128 % 2 == 0,...

View Article

[LeetCode]My Calendar I

题目描述:LeetCode 729. My Calendar IImplement a MyCalendar class to store your events. A new event can be added if adding the event will not cause a double booking.Your class will have the method, book(int...

View Article

[LeetCode]Count Different Palindromic Subsequences

题目描述:LeetCode 730. Count Different Palindromic SubsequencesGiven a string S, find the number of different non-empty palindromic subsequences in S, and return that number modulo 10^9 + 7.A subsequence...

View Article

[LeetCode]My Calendar II

题目描述:LeetCode 731. My Calendar IIImplement a MyCalendarTwo class to store your events. A new event can be added if adding the event will not cause a triple booking.Your class will have one method,...

View Article


LeetCode Weekly Contest 59解题报告

LeetCode Weekly Contest 59是LeetCode举办的第六十三场正式周赛,共4道题目,比赛时长1.5小时。比赛链接:https://leetcode.com/contest/leetcode-weekly-contest-59/题解列表:LeetCode 728. Self Dividing NumbersLeetCode 729. My Calendar ILeetCode...

View Article

[LeetCode]My Calendar III

题目描述:LeetCode 732. My Calendar IIIImplement a MyCalendarThree class to store your events. A new event can always be added.Your class will have one method, book(int start, int end). Formally, this...

View Article


[LeetCode]Flood Fill

题目描述:LeetCode 733. Flood FillAn image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535).Given a coordinate (sr, sc) representing the...

View Article

[LeetCode]Sentence Similarity

题目描述:LeetCode 734. Sentence SimilarityGiven 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]Asteroid Collision

题目描述:LeetCode 735. Asteroid CollisionWe are given an array asteroids of integers representing asteroids in a row.For each asteroid, the absolute value represents its size, and the sign represents its...

View Article

[LeetCode]Parse Lisp Expression

题目描述:LeetCode 736. Parse Lisp ExpressionYou are given a string expression representing a Lisp-like expression to return the integer value of.The syntax for these expressions is given as follows.An...

View Article

LeetCode Weekly Contest 60解题报告

LeetCode Weekly Contest 60是LeetCode举办的第六十四场正式周赛,共4道题目,比赛时长1.5小时。比赛链接:https://leetcode.com/contest/leetcode-weekly-contest-60/题解列表:LeetCode 733. Flood FillLeetCode 734. Sentence SimilarityLeetCode 735....

View Article
Browsing all 559 articles
Browse latest View live