算法相关
boy_nihao
coding
展开
-
ArrayList和LinkedList的几种循环遍历方式及性能对比分
转自:http://www.trinea.cn/android/arraylist-linkedlist-loop-performance/ 主要介绍ArrayList和LinkedList这两种list的五种循环遍历方式,各种方式的性能测试对比,根据ArrayList和LinkedList的源码实现分析性能结果,总结结论。 通过本文你可以了解 (1)List的五种遍历方式及各转载 2015-09-21 19:36:36 · 10009 阅读 · 5 评论 -
leetcode:119. Pascal's Triangle II(Java)解答
转载请注明出处:z_zhaojun的博客 原文地址:http://blog.csdn.net/u012975705/题目地址:https://leetcode.com/problems/pascals-triangle-ii/Pascal’s Triangle IIGiven an index k, return the kth row of the Pascal's tri原创 2016-01-10 17:52:58 · 2450 阅读 · 0 评论 -
leetcode:283. Move Zeroes(Java)解答
转载请注明出处:z_zhaojun的博客 原文地址:http://blog.csdn.net/u012975705题目地址:https://leetcode.com/problems/move-zeroes/ Move ZeroesGiven an array nums, write a function to move all 0's to the end of it while原创 2016-01-10 21:05:39 · 2294 阅读 · 1 评论 -
leetcode:92. Reverse Linked List II(Java)解答
转载请注明出处:z_zhaojun的博客 原文地址:http://blog.csdn.net/u012975705 题目地址:https://leetcode.com/problems/reverse-linked-list-ii/Reverse Linked List IIReverse a linked list from position m to n. Do it in-place an原创 2015-12-26 16:14:34 · 2693 阅读 · 0 评论 -
leetcode:82. Remove Duplicates from Sorted List II(Java)解答
转载请注明出处:z_zhaojun的博客 原文地址:http://blog.csdn.net/u012975705 题目地址:https://leetcode.com/problems/reverse-linked-list-ii/Remove Duplicates from Sorted List IIGiven a sorted linked list, delete all原创 2015-12-27 00:18:19 · 2007 阅读 · 1 评论 -
leetcode:142. Linked List Cycle II(Java)解答
转载请注明出处:z_zhaojun的博客 原文地址:http://blog.csdn.net/u012975705 题目地址:https://leetcode.com/problems/linked-list-cycle-ii/Linked List Cycle IIGiven a linked list, return the node where the cycle be原创 2015-12-27 16:36:19 · 2832 阅读 · 1 评论 -
回顾:树的几种迭代遍历方式
PS:文章最后附上完整代码一、中序遍历List<Integer> inOrder(BTree root) { List<Integer> result = new ArrayList<>(); Stack<BTree> stack = new Stack<&a原创 2018-05-09 19:56:50 · 2307 阅读 · 0 评论