随笔分类 -  leetcode_linkedList

摘要:Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 题目含义:判断一个列表是否有环路 思路:参考142. Linked List C 阅读全文
posted @ 2017-10-24 16:22 daniel456 阅读(131) 评论(0) 推荐(0) 编辑
摘要:Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 题目含义:给定一个升序的列表,构造一个平衡二叉树 平衡二叉树:二叉排序树集中了数 阅读全文
posted @ 2017-10-24 14:16 daniel456 阅读(111) 评论(0) 推荐(0) 编辑
摘要:A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy 阅读全文
posted @ 2017-10-24 11:31 daniel456 阅读(120) 评论(0) 推荐(0) 编辑
摘要:Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 -- 阅读全文
posted @ 2017-10-21 23:36 daniel456 阅读(74) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示