摘要: 1 """ 2 Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. 3 Do not allocate 阅读全文
posted @ 2020-02-20 22:07 yawenw 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Implement strStr(). 3 Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 4 Example 1: 5 阅读全文
posted @ 2020-02-20 22:06 yawenw 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the 阅读全文
posted @ 2020-02-20 16:35 yawenw 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which giv 阅读全文
posted @ 2020-02-20 11:44 yawenw 阅读(143) 评论(0) 推荐(0) 编辑