随笔分类 - leetcode题解
摘要:题目连接https://leetcode.com/problems/longest-valid-parentheses/Longest Valid ParenthesesDescriptionGiven a string containing just the characters ‘(’ and ...
阅读全文
摘要:题目连接https://leetcode.com/problems/valid-sudoku/Valid SudokuDescriptionDetermine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudo...
阅读全文
摘要:题目连接https://leetcode.com/problems/sudoku-solver/Sudoku SolverDescriptionWrite a program to solve a Sudoku puzzle by filling the empty cells.Empty cell...
阅读全文
摘要:题目连接https://leetcode.com/problems/count-and-say/Count and SayDescriptionThe count-and-say sequence is the sequence of integers beginning as follows:1,...
阅读全文
摘要:题目连接https://leetcode.com/problems/multiply-strings/Multiply StringsDescriptionGiven two numbers represented as strings, return multiplication of the n...
阅读全文
摘要:题目连接https://leetcode.com/problems/anagrams/Group AnagramsDescriptionGiven an array of strings, group anagrams together.For example, given: [“eat”, “te...
阅读全文
摘要:题目连接https://leetcode.com/problems/spiral-matrix/Spiral MatrixDescriptionGiven a matrix of m x n elements (m rows, n columns), return all elements of t...
阅读全文
摘要:题目连接https://leetcode.com/problems/length-of-last-word/Length of Last WordDescriptionGiven a string s consists of upper/lower-case alphabets and empty ...
阅读全文
摘要:题目连接https://leetcode.com/problems/plus-one/Plus OneDescriptionGiven a non-negative number represented as an array of digits, plus one to the number.Th...
阅读全文
摘要:题目连接https://leetcode.com/problems/add-binary/Add BinaryDescriptionGiven two binary strings, return their sum (also a binary string).For example,a = “1...
阅读全文
摘要:题目连接https://leetcode.com/problems/search-a-2d-matrix/Search a 2D MatrixDescriptionWrite an efficient algorithm that searches for a value in an m x n m...
阅读全文
摘要:题目连接https://leetcode.com/problems/word-search/Word SearchDescriptionGiven a 2D board and a word, find if the word exists in the grid.The word can be c...
阅读全文
摘要:题目连接https://leetcode.com/problems/path-sum/Path Sum/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; *...
阅读全文
摘要:题目连接https://leetcode.com/problems/path-sum-ii/Path Sum II/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *l...
阅读全文
摘要:题目连接https://leetcode.com/problems/flatten-binary-tree-to-linked-list/Flatten Binary Tree to Linked ListDescription/** * Definition for a binary tree n...
阅读全文
摘要:题目连接https://leetcode.com/problems/pascals-triangle/Pascal's TriangleDescriptionGiven numRows, generate the first numRows of Pascal’s triangle.For exam...
阅读全文
摘要:题目连接https://leetcode.com/problems/triangle/TriangleDescriptionGiven a triangle, find the minimum path sum from top to bottom. Each step you may move t...
阅读全文
摘要:题目连接https://leetcode.com/problems/valid-palindrome/Valid PalindromeDescriptionGiven a string, determine if it is a palindrome, considering only alphan...
阅读全文
摘要:题目连接 https://leetcode.com/problems/word-ladder/ Word Ladder Description Given two words (beginWord and endWord), and a dictionary’s word list, find th
阅读全文
摘要:题目连接https://leetcode.com/problems/longest-consecutive-sequence/Longest Consecutive SequenceDescriptionGiven an unsorted array of integers, find the le...
阅读全文

浙公网安备 33010602011771号