摘要: Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3].... Example 1: Example 2: Note: You may assume all input has 阅读全文
posted @ 2019-05-22 14:58 小白兔云 阅读(116) 评论(0) 推荐(0)
摘要: One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, 阅读全文
posted @ 2019-05-22 12:40 小白兔云 阅读(146) 评论(0) 推荐(0)
摘要: Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the 阅读全文
posted @ 2019-05-22 10:32 小白兔云 阅读(131) 评论(0) 推荐(0)