这道题目不能用go语言写答案,所以用了C语言 题目 Write a function to delete a node (except the tail) in a singly linked list, given o…
标签:LeetCode Go
[LeetCode By Go 9]344. Reverse String
题目 Write a function that takes a string as input and returns the string reversed. Example: Given s = “he…
[LeetCode By Go 89]367. Valid Perfect Square
题目 Given a positive integer num, write a function which returns True if num is a perfect square else False. No…
[LeetCode By Go 34]383. Ransom Note
题目 Given an arbitrary ransom note string and another string containing letters from all the magazines, write a…
[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 47]242. Valid Anagram
题目 Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = “a…
[LeetCode By Go 30]598. Range Addition II
题目 Given an m * n matrix M initialized with all 0’s and several update operations. Operations are repres…
[LeetCode By Go 90]643. Maximum Average Subarray I
题目 Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximu…
[LeetCode By Go 11]463. Island Perimeter
题目 You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents wate…
[LeetCode By Go 70]326. Power of Three
题目 Given an integer, write a function to determine if it is a power of three. Follow up: Could you do it witho…
[LeetCode By Go 20]226. Invert Binary Tree
HomeBrew作者去Google面试做错的一道题,影响很大,大家一定要研究下这道题。 事件回放 2015 年 6 月 10 日,Homebrew 的作者 @Max Howell 在 twitter 上发表了如下一内容:…
[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…