需要再看
zyp7355
这个作者很懒,什么都没留下…
展开
-
leetcode #92Reverse Linked List II
Reverse a linked list from position m to n. Do it in one-pass.Note: 1 ≤ m ≤ n ≤ length of list.Example:Input: 1->2->3->4->5->NULL, m = 2, n = 4Output: 1->4->3->2->5->...原创 2020-04-17 05:56:59 · 143 阅读 · 1 评论 -
leetcode 56 merge intervals
Merge IntervalsMedium3494257Add to ListShareGiven a collection of intervals, merge all overlapping intervals.Example 1:Input: [[1,3],[2,6],[8,10],[15,18]]Output: [[1,6],[8,10],[15,18]]Expl...原创 2020-04-08 03:38:05 · 102 阅读 · 0 评论 -
leetcode#50 Pow(x, n)
mplement pow(x, n), which calculates x raised to the power n (xn).Example 1:Input: 2.00000, 10Output: 1024.00000Example 2:Input: 2.10000, 3Output: 9.26100Example 3:Input: 2.00000, -2Output: 0...原创 2020-02-11 08:58:18 · 97 阅读 · 0 评论 -
leetcode 48 # rotate image
You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Note:You have to rotate the image in-place, which means you have to modify the input 2D matrix dire...原创 2020-04-03 04:39:10 · 74 阅读 · 0 评论 -
leetcode #43 Multiply Strings
Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.Example 1:Input: num1 = “2”, num2 = “3”Output: “6”Example 2:...原创 2020-04-03 03:20:35 · 93 阅读 · 0 评论 -
leetcode#36. Valid Sudoku
Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:Each row must contain the digits 1-9 without repetition.Each column must contain...原创 2020-02-08 06:35:57 · 84 阅读 · 0 评论 -
leetcode #143. Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You may not modify the values in the list’s nodes, only nodes itself may be changed.Example 1:Given 1->2->...原创 2020-03-06 04:02:44 · 82 阅读 · 0 评论