Given an integer n, find the closest integer (not including itself), which is a palindrome. The ‘…
分类:LeetCode题目解答
LeetCode之Divide and Conquer题目汇总
Different Ways to Add Parentheses Given a string of numbers and operators, return all possible results from co…
120. Triangle
120. Triangle 题目 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adj…
[LeetCode] Word Search 词语搜索
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from lett…
LeetCode 147 Insertion Sort List
题目描述 Sort a linked list using insertion sort. 代码 public ListNode insertionSortList(ListNode head) { if (head =…
983. Minimum Cost For Tickets
In a country popular for train travel, you have planned some train travelling one year in advance. The days of…
[Leetcode] Paint Fence 栅栏涂色
Paint Fence There is a fence with n posts, each post can be painted with one of the k colors. You have to pain…
137. Single Number II
欢迎fork and star:Nowcoder-Repository-github 137. Single Number II 题目 Given an array of integers, every element …
[LeetCode] Set Matrix Zeroes 矩阵赋零
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it…
[LeetCode] Add Bold Tag in String 字符串中增添加粗标签
Given a string s and a list of strings dict, you need to add a closed pair of bold tag&n…
LeetCode | Binary Tree Postorder Traversal
题目: Given a binary tree, return the postorder traversal of its nodes’ values. For example: Giv…
[Leetcode] Summary Ranges 统计区间
Summary Ranges Given a sorted integer array without duplicates, return the summary of its ranges. For example,…