随笔分类 -  Leetcode_golang

刷题是种修养
摘要:6. Zigzag convertion 对输入的字符串做锯齿形变换,并输出新的字符串,所谓zigzag变化如下图所示。 将"ABCDEFGHIJKL"做4行的锯齿变换,新的字符串为:AGBFHLCEIKDJ" 实现一个根据输入字符串s与行数numRows的函数。 思路: 根据输入的行数创建一个字符 阅读全文
posted @ 2018-06-28 09:10 gexin1023 阅读(115) 评论(0) 推荐(0)
摘要:3. Find the longest substring without repeating characters Given a string, find the length of the longest substring without repeating characters. 给一个字 阅读全文
posted @ 2018-06-27 17:35 gexin1023 阅读(223) 评论(0) 推荐(0)
摘要:2. Add_Two_Number 用两个非空链表分别表示两个非负整数,链表的节点表示数字的位,链表头表示数字的低位,链表尾表示数字高位。求两个链表所表示数字的和。 比如: Input: (2 4 3) + (5 6 4) Output: 7 0 8 Explanation: 342 + 465 = 阅读全文
posted @ 2018-06-26 18:00 gexin1023 阅读(146) 评论(0) 推荐(0)
摘要:1. Two Sum + 输入:一个整数数组nums[],一个整数target + 返回:数组中找出2个数,使其和为target,并返回两个数在数列中的索引。 比如: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] 阅读全文
posted @ 2018-06-18 22:45 gexin1023 阅读(141) 评论(0) 推荐(0)