随笔分类 -  Leetcode

深度复制链表
摘要:题目大意:深拷贝一个链表,链表除了含有next指针外,还包含一个random指针,该指针指向字符串中的某个节点或者为空。 节点定义为: struct RandomListNode { int label; RandomListNode *next, *random; RandomListNode(i 阅读全文

posted @ 2018-02-01 16:27 wsw_seu 阅读(180) 评论(0) 推荐(0)

224、Basic Calculator
摘要:Implement a basic calculator to evaluate a simple expression string. The expression string may contain open ( and closing parentheses ), the plus + or 阅读全文

posted @ 2018-02-01 14:38 wsw_seu 阅读(111) 评论(0) 推荐(0)

4sum
摘要:Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array whic 阅读全文

posted @ 2017-10-04 19:32 wsw_seu 阅读(131) 评论(0) 推荐(0)

3Sum
摘要:2017-10-04 16:30:13 Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array whi 阅读全文

posted @ 2017-10-04 16:44 wsw_seu 阅读(111) 评论(0) 推荐(0)

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 ex 阅读全文

posted @ 2017-10-03 19:28 wsw_seu 阅读(161) 评论(0) 推荐(0)

导航