题目 Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: “202” …
分类:LeetCode
[LeetCode By Go 105]112. Path Sum
题目 Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the va…
[LeetCode By Go 60]543. Diameter of Binary Tree
题目 Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary t…
[LeetCode By Go 16]136. Single Number
题目 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your al…
[LeetCode By Go 91]459. Repeated Substring Pattern
题目 Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple …
[LeetCode By Go 35]Add to List 171. Excel Sheet Column Number
题目 Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its c…
[LeetCode By Go 14]521. Longest Uncommon Subsequence I
题目 Given a group of two strings, you need to find the longest uncommon subsequence of this group of two string…
[LeetCode By Go 17]485. Max Consecutive Ones
题目 Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1…
[LeetCode By Go 42]169. Majority Element
题目 Given an array of size n, find the majority element. The majority element is the element that appears more …
[LeetCode By Go 10]412. Fizz Buzz
题目 Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three i…
[LeetCode By Go 22]Add to List 371. Sum of Two Integers
题目 Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Gi…
[LeetCode By Go 15]292. Nim Game
题目 You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time …