
刷 LeetCode 从零开始学 GoLang
本专栏通过刷 LeetCode Easy 的题,学习 GoLang 语法,每天不定期更新。
在刷题过程中遇到的 GoLang 语法都是博主现查现写的,可能不是最优解。
杨领well
君子食无求饱,居无求安,敏于事而慎于言,就有道而正焉。
展开
-
刷 LeetCode 从零开始学 GoLang(结束语)
该专栏结束,后续会在 杨领well的 LeetCode 题解专栏 继续更新 LeetCode 题解原创 2019-10-19 21:26:36 · 150 阅读 · 0 评论 -
刷 LeetCode 从零开始学 GoLang(11):35. Search Insert Position
题目描述Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the arra...原创 2019-10-18 10:29:12 · 170 阅读 · 0 评论 -
刷 LeetCode 从零开始学 GoLang(10):242. Valid Anagram
题目描述Given two strings s and t , write a function to determine if t is an anagram of s.Example 1:Input: s = "anagram", t = "nagaram"Output: trueExample 2:Input: s = "rat", t = "car"Output: fals...原创 2019-10-17 10:10:56 · 112 阅读 · 0 评论 -
刷 LeetCode 从零开始学 GoLang(9): 27. Remove Element
题目描述Given an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the input ...原创 2019-10-16 09:42:48 · 138 阅读 · 0 评论 -
刷 LeetCode 从零开始学 GoLang(8):26. Remove Duplicates from Sorted Array
题目描述Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by mod...原创 2019-10-15 09:45:31 · 154 阅读 · 0 评论 -
刷 LeetCode 从零开始学 GoLang(7):21. Merge Two Sorted Lists
题目描述Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4, 1->3->4Output: ...原创 2019-10-14 09:47:00 · 137 阅读 · 0 评论 -
刷 LeetCode 从零开始学 GoLang(6): 20. Valid Parentheses
题目描述Given a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same type o...原创 2019-10-13 15:20:08 · 154 阅读 · 0 评论 -
刷 LeetCode 从零开始学 GoLang(5):14. Longest Common Prefix
题目描述Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string “”.Example 1:Input: ["flower","flow","flight"]Output...原创 2019-10-12 21:57:13 · 210 阅读 · 0 评论 -
刷 LeetCode 从零开始学 GoLang(4):13. Roman to Integer
题目描述Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D ...原创 2019-10-11 09:22:31 · 156 阅读 · 0 评论 -
刷 LeetCode 从零开始学 GoLang(3):9. Palindrome Number
题目描述Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Input: -121Output: falseExpla...原创 2019-10-10 09:25:05 · 146 阅读 · 0 评论 -
刷 LeetCode 从零开始学 GoLang(2):7. Reverse Integer
题目描述Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dealing ...原创 2019-10-09 10:25:42 · 124 阅读 · 0 评论 -
刷 LeetCode 从零开始学 GoLang(1):1. Two Sum
题目描述Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the s...原创 2019-10-08 07:03:36 · 131 阅读 · 0 评论