LeetCode 题目Golang实现汇总

题号 原题目 中文题目 实现
2 Add Two Numbers 两数相加 Golang
3 Longest Substring 求不含重复字符的最长子串 Golang
5 Longest Palindromic Substring 最长回文子串 Golang
6 ZigZag Conversion Z字形变换 Golang
8 String to Integer 字符串转整数 Golang
12 Integer to Roman 整数转罗马数 Golang
17 Letter Combinations of A… 求电话号码的字母组合 Golang
19 Remove Nth Node From End of List 移除链表末尾起第N个节点 Golang
24 Swap Nodes In Pairs 成对交换节点 Golang
33 Search in Rotated Sorted Array 在旋转的有序数组搜索 Golang
34 Find First and Last Position… 寻找元素的出现范围 Golang
48 Rotate Image 旋转图像 Golang
54 Spiral Matrix 螺旋矩阵 Golang
55 Jump Game 跳跃游戏 Golang
56 Merge Intervals 合并区间 Golang
59 Spiral Matrix II 螺旋矩阵 II Golang
60 Permutation Sequence 求第k个排列 Golang
61 Rotate List 旋转链表 Golang
71 Simplify Path 简化路径 Golang
73 Set Matrix Zeroes 矩阵置零 Golang
74 Search a 2D Matrix 二维矩阵搜索 Golang
75 Sort Colors 颜色排序 Golang
77 Combinations 组合 Golang
81 Search in Rotated Sorted Array II 在旋转的排序数组搜索 II Golang
86 Partition List 分割链表 Golang
91 Decode Ways 解码方式 Golang
93 Restore IP Addresses 还原IP地址 Golang
95 Unique Binary Search Trees II 不同的二叉搜索树 II Golang
96 Unique Binary Search Trees 不同的二叉搜索树 Golang
98 Validate Binary Search Tree 校验二叉搜索树 Golang
102 Binary Tree Level Order Traversal 二叉树层次遍历 Golang
103 Binary Tree Zigzag Level Order Traversal 二叉树层次遍历 Golang
106 Construct Binary Tree from Inorder… 根据中后序遍历构造二叉树 Golang
130 Surrounded Regions 围起的区域 Golang
143 Reorder List 重排链表 Golang
144 Binary Tree Preorder Traversal 二叉树先序遍历 Golang
145 Binary Tree Postorder Traversal 二叉树后序遍历 Golang
151 Reverse Words in a String 将字符串中的单词翻转 Golang
165 Compare Version Numbers 版本号比对 Golang
198 House Robber 入室抢劫者 Golang
199 Binary Tree Right Side View 二叉树右侧视角图 Golang
224 Basic Calculator 简单计算器 Golang
338 Couting Bits 计算二进制数中1的个数 Golang
355 Design Twitter 设计推特 Golang
393 UTF-8 Validation UTF-8编码校验 Golang
413 Arithmetic Slices 等差数列切片 Golang
451 Sort Characters By Frequency 以出现频次排序字符 Golang
477 Total Hamming Distance 汉明距离总和 Golang
508 Most Frequent Subtree Sum 高频子树和 Golang
513 Find Bottom Left Tree Value 找出二叉树左下角节点的值 Golang
515 Find Largest Value in Each Tree Row 寻找二叉树每层的最大值 Golang
641 Design Circular Deque 设计循环双端队列 Golang
701 Insert into a Binary Search Tree 二叉搜索树插入 Golang
807 Max Increase to Keep City… 求保持城市现有天际线的最大增高 Golang
856 Score of Parentheses 括号的分值 Golang
885 Spiral Matrix III 螺旋矩阵 III Golang
889 Construct Binary Tree from… 以先序及后序遍历构建二叉树 Golang
911 Online Election 在线选举 Golang
946 Validate Stack Sequences 校验栈序列 Golang
958 Check Completeness of a Binary Tree 检查二叉树的完整性 Golang
981 Time Based Key-Value Store 基于时间的“键-值”存储 Golang
1008 Construct Binary Search Tree… 以先序遍历构建二叉搜索树 Golang