题目 Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array.…
标签:LeetCode Go
[LeetCode By Go 56]504. Base 7
题目 Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: “202” …
[LeetCode By Go 4]476. Number Complement
题目描述 Given a positive integer, output its complement number. The complement strategy is to flip the bits of it…
[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 58]551. Student Attendance Record I
题目 You are given a string representing an attendance record for a student. The record only contains the follow…
[LeetCode By Go 24]653. Two Sum IV - Input is a BST
题目 Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such tha…
[LeetCode By Go 44]506. Relative Ranks
题目 Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who…
[LeetCode By Go 23]258. Add Digits
题目 Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For ex…
[LeetCode By Go 3]561. Array Partition I
题目 Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), …
[LeetCode By Go 64]405. Convert a Number to Hexadecimal
题目 Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement m…
[LeetCode By Go 52]447. Number of Boomerangs
题目 Given n points in the plane that are all pairwise distinct, a “boomerang” is a tuple of points …
[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…