摘要: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
posted @ 2017-09-05 07:33 白常福 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Invert a binary tree. to Trivia:This problem was inspired by this original tweet by Max Howell: 分析:翻转二叉树 思路1: 使用递归的方式,时间复杂度为o(n),空间复杂度为o(n) JAVA CODE 阅读全文
posted @ 2017-09-05 07:02 白常福 阅读(251) 评论(0) 推荐(0) 编辑