原创 LeetCode - easy-695. Max Area of Island

問題 Given a non-empty 2D array grid of 0’s and 1’s, an island is a group of 1’s (representing land) connected 4-directio

原创 LeetCode - 48. Rotate Image

問題 You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Coul

原创 LeetCode - easy-682. Baseball Game

問題 You’re now a baseball game point recorder. Given a list of strings, each string can be one of the 4 following types:

原创 LeetCode - easy-744. Find Smallest Letter Greater Than Target

問題 Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find

原创 hard-480. Sliding Window Median

問題 Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So

原创 LeetCode - easy-141. Linked List Cycle

問題 Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 思考 此

原创 LeetCode - 98. Validate Binary Search Tree

問題 Medium Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows:

原创 LeetCode - 409. Longest Palindrome

問題 Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can

原创 LeetCode - easy-697. Degree of an Array

問題 Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency

原创 LeetCode - easy-628. Maximum Product of Three Numbers

問題 Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Input

原创 LeetCode - 19. Remove Nth Node From End of List

問題 Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1

原创 LeetCode - easy-720. Longest Word in Dictionary

720. Longest Word in Dictionary Given a list of strings words representing an English Dictionary, find the longest word