摘要: 题目描述:将数组到零移到最后,并保持不为0到数相对位置不变 Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-z 阅读全文
posted @ 2019-12-31 09:01 smallone1 阅读(432) 评论(0) 推荐(0)
摘要: 题目描述:反转链表 Reverse a singly linked list. Example: Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both? 阅读全文
posted @ 2019-12-30 09:29 smallone1 阅读(115) 评论(0) 推荐(0)
摘要: 题目描述:给一个二叉树,反转它 Invert a binary tree. Example: Input: Output: Trivia:This problem was inspired by this original tweet by Max Howell: 思路: 递归,从根节点出发,反转当 阅读全文
posted @ 2019-12-30 09:20 smallone1 阅读(141) 评论(0) 推荐(0)
摘要: 题目描述: 给一个数组,数组中只有一个数字出现了一次,其他的数字都出现了两次,找到这个只出现一次的数字 Given a non-empty array of integers, every element appears twice except for one. Find that single 阅读全文
posted @ 2019-12-30 09:16 smallone1 阅读(159) 评论(0) 推荐(0)
摘要: 题目描述:给一个二叉树,返回该二叉树的最大深度 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root nod 阅读全文
posted @ 2019-12-30 09:03 smallone1 阅读(138) 评论(0) 推荐(0)
摘要: 题目描述:给予两个二叉树 t1 , t2 ,合并他们。 Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overl 阅读全文
posted @ 2019-12-30 08:22 smallone1 阅读(153) 评论(0) 推荐(0)
摘要: 一、java 1. download java 2. install java 3. vim ~/.bash_profile 4. 5. java -version 6. 成功了 二、MAVEN 1. 官网下载 maven包 2. install 3. vim ~/.bash_profile 4. 阅读全文
posted @ 2019-12-28 16:56 smallone1 阅读(215) 评论(0) 推荐(0)