摘要:
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not... 阅读全文
摘要:
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?解题:开始进入一个误区,跟循环链表搞混了,其实这个环的开头可以不在head这里,例如... 阅读全文