摘要:
Given the head of a singly linked list, sort the list using insertion sort, and return the sorted list's head. The steps of the insertion sort algorit 阅读全文
阅读排行榜
[LeetCode] 85. Maximal Rectangle_Hard tag: Dynamic Programming
2023-09-14 08:26 by Johnson_强生仔仔, 15 阅读, 收藏,
摘要:
Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Example 1: Input: matri 阅读全文
[LeetCode] 5. Longest Palindromic Substring _Medium tag: Two pointers
2021-07-29 00:38 by Johnson_强生仔仔, 14 阅读, 收藏,
摘要:
Given a string s, return the longest palindromic substring in s. Example 1: Input: s = "babad" Output: "bab" Note: "aba" is also a valid answer. Examp 阅读全文
[LeetCode] 48. Rotate Image_Medium tag: array
2021-08-08 04:24 by Johnson_强生仔仔, 13 阅读, 收藏,
摘要:
You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means 阅读全文
[Leetcode] 543. Diameter of Binary Tree_Easy Tag: DFS
2021-07-29 05:51 by Johnson_强生仔仔, 8 阅读, 收藏,
摘要:
Given the root of a binary tree, return the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwee 阅读全文
浙公网安备 33010602011771号