题目 Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who…
标签:LeetCode Go
[LeetCode By Go 65]594. Longest Harmonious Subsequence
题目 We define a harmonious array is an array where the difference between its maximum value and its minimum val…
[LeetCode By Go 77]53. Maximum Subarray
题目 Find the contiguous subarray within an array (containing at least one number) which has the largest sum. Fo…
[LeetCode By Go 69]107. Binary Tree Level Order Traversal II
题目 Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left …
[LeetCode By Go 88]342. Power of Four
题目 Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example: Given num…
[LeetCode By Go 102]141. Linked List Cycle
这道题不能用go写,所以用C语言写的 题目 Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it with…
[LeetCode By Go 724] Easy, Array, 724. Find Pivot Index
题目 Given an array of integers nums, write a method that returns the “pivot” index of this array. W…
[LeetCode By Go 95]232. Implement Queue using Stacks
题目 Implement the following operations of a queue using stacks. push(x) — Push element x to the back of q…
[LeetCode By Go 21]448. Find All Numbers Disappeared in an Array
题目 Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others ap…
[LeetCode By Go 54]401. Binary Watch
题目 A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represe…
[LeetCode By Go 74]83. Remove Duplicates from Sorted List
本题目测试中给出了 初始化链表 和 判断两个链表是否相同 的方法 题目 Given a sorted linked list, delete all duplicates such that each element a…
[LeetCode By Go 81]235. Lowest Common Ancestor of a Binary Search Tree
该题目不能用go语言写,因此使用了C语言(C++忘的更多…)。Go语言写多了,判断语句也忘了加括号,语句末尾忘了加”;”,一条语句的statement也加了”{}̶…