10 2018 档案

摘要:Reverse a singly linked list. Example: Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both? 反转单链表,看到我 阅读全文
posted @ 2018-10-31 20:29 Pickle 阅读(245) 评论(0) 推荐(0) 编辑
摘要:Given a linked list, swap every two adjacent nodes and return its head. Example: Note: Your algorithm should use only constant extra space. You may no 阅读全文
posted @ 2018-10-31 20:06 Pickle 阅读(238) 评论(0) 推荐(0) 编辑
摘要:Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be 阅读全文
posted @ 2018-10-16 14:44 Pickle 阅读(289) 评论(0) 推荐(0) 编辑
摘要:You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t 阅读全文
posted @ 2018-10-15 17:14 Pickle 阅读(152) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Note: 解法一:利用s 阅读全文
posted @ 2018-10-15 16:32 Pickle 阅读(224) 评论(0) 推荐(0) 编辑
摘要:Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. Follow up:Can you 阅读全文
posted @ 2018-10-10 14:26 Pickle 阅读(173) 评论(0) 推荐(0) 编辑
摘要:Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 经典问题,判断一个单向链表是否有环,快慢指针,有相遇即有环。 阅读全文
posted @ 2018-10-10 14:21 Pickle 阅读(168) 评论(0) 推荐(0) 编辑

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