题目 Write an algorithm to determine if a number is “happy”. A happy number is a number defined by t…
分类:LeetCode
[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…
[LeetCode By Go 45]237. Delete Node in a Linked List
这道题目不能用go语言写答案,所以用了C语言 题目 Write a function to delete a node (except the tail) in a singly linked list, given o…
[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…