加载中...
分类详情
困难 分类
37-解数独(Sudoku Solver)
原文链接: https://leetcode-cn.com/problems/sudoku-solver 英文原文Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the following rules: Each of the digits 1-9 must occur exactly once in each row. Each …
2021-12-03
51-N 皇后(N-Queens)
原文链接: https://leetcode-cn.com/problems/n-queens 英文原文The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-queens puzzle. You…
2021-12-03
52-N皇后 II(N-Queens II)
原文链接: https://leetcode-cn.com/problems/n-queens-ii 英文原文The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other. Given an integer n, return the number of distinct solutions to the n-queen…
2021-12-03
65-有效数字(Valid Number)
原文链接: https://leetcode-cn.com/problems/valid-number 英文原文A valid number can be split up into these components (in order): A decimal number or an integer. (Optional) An 'e' or 'E', followed by an integer. A decimal number can be split up into these com…
2021-12-03
68-文本左右对齐(Text Justification)
原文链接: https://leetcode-cn.com/problems/text-justification 英文原文Given an array of strings words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justified. You should pack your word…
2021-12-03
72-编辑距离(Edit Distance)
原文链接: https://leetcode-cn.com/problems/edit-distance 英文原文Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations permitted on a word: Insert a character De…
2021-12-03
87-扰乱字符串(Scramble String)
原文链接: https://leetcode-cn.com/problems/scramble-string 英文原文We can scramble a string s to get a string t using the following algorithm: If the length of the string is 1, stop. If the length of the string is > 1, do the following: Split the string into…
2021-12-03
135-分发糖果(Candy)
原文链接: https://leetcode-cn.com/problems/candy 英文原文There are n children standing in a line. Each child is assigned a rating value given in the integer array ratings. You are giving candies to these children subjected to the following requirements: Each…
2021-12-03
164-最大间距(Maximum Gap)
原文链接: https://leetcode-cn.com/problems/maximum-gap 英文原文Given an integer array nums, return the maximum difference between two successive elements in its sorted form. If the array contains less than two elements, return 0. You must write an algorithm …
2021-12-03