120. Triangle 题目 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adj…
分类:LeetCode
[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…
LeetCode | Palindrome Number(回文数字)
题目: Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hi…
LeetCode [1. Two Sum] 难度[easy]
题目 Given an array of integers, return indices of the two numbers such that they add up to a specific target. Y…
Swift 存在重复 - LeetCode
存在重复 给定一个整数数组,判断是否存在重复元素。 如果任何值在数组中出现至少两次,函数应该返回 true。如果每个元素都不相同,则返回 false。 这个算是比较容易的。(判断的方法依据就是:我不用百度会做Ƕ…
【LeetCode】- Search in Rotated Array
1、题目描述 Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., […
Convert Binary Search Tree to Doubly Linked List
Convert a binary search tree to doubly linked list with in-order traversal. Example Given a binary search tree…
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…