马上写了30道题目了,使用golang写起题目来代码简洁明了,还可以非常方便的写测试用例,加上Goland可以进行调试,有如神助。 但无论如何,写了测试就会依赖测试判断对错,用了debug就会依赖debug来寻找出错的地…
标签:LeetCode Go
[LeetCode By Go 79]27. Remove Element
题目 Given an array and a value, remove all instances of that value in place and return the new length. Do not a…
[LeetCode By Go 40]599. Minimum Index Sum of Two Lists
题目 Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restau…
[LeetCode By Go 18]104. Maximum Depth of Binary Tree
题目 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest pat…
[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 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…