题目 Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes…
标签:LeetCode Go
[LeetCode By Go 93]110. Balanced Binary Tree
题目 Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is…
[LeetCode By Go 41]563. Binary Tree Tilt
题目 Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute …
[LeetCode By Go 12]496. Next Greater Element I
题目 You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. F…
[LeetCode By Go 66]202. Happy Number
题目 Write an algorithm to determine if a number is “happy”. A happy number is a number defined by t…
[LeetCode By Go 85]118. Pascal's Triangle
题目 Given numRows, generate the first numRows of Pascal’s triangle. For example, given numRows = 5, Retur…
[LeetCode By Go 68]645. Set Mismatch
题目 The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the num…
[LeetCode By Go 46]100. Same Tree
题目 Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered…
[LeetCode By Go 94]119. Pascal's Triangle II
题目 Given an index k, return the kth row of the Pascal’s triangle. For example, given k = 3, Return [1,3,…
[LeetCode By Go 5]500. Keyboard Row
题目 问题链接:https://leetcode.com/problems/keyboard-row/#/description Given a List of words, return the words that …
[LeetCode By Go 31]453. Minimum Moves to Equal Array Elements
题目 Given a non-empty integer array of size n, find the minimum number of moves required to make all array elem…
[LeetCode By Go 747] Easy, Array, 747. Largest Number At Least Twice of Others
题目 In a given integer array nums, there is always exactly one largest element. Find whether the largest elemen…