关闭

leetcode:144. Binary Tree Preorder Traversal

转载请注明出处:z_zhaojun的博客 原文地址 题目地址 Binary Tree Preorder TraversalGiven a binary tree, return the preorder traversal of its nodes' values.For example: Given binary tree {1,#,2,3}, return [1,2,3].思路:优先添...
阅读(1163) 评论(0)

leetcode:41. First Missing Positive (Java)

转载请注明出处:z_zhaojun的博客 原文地址 题目地址 First Missing PositiveGiven an unsorted integer array, find the first missing positive integer.For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2.Your algo...
阅读(1233) 评论(1)

leetcode:268. Missing Number(Java)解答

转载请注明出处:z_zhaojun的博客 原文地址 题目地址 Missing NumberGiven an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example, Given nums = [0, 1, 3...
阅读(2087) 评论(0)

leetcode:122. Best Time to Buy and Sell Stock II(java)解答

转载请注明出处:z_zhaojun的博客 原文地址 题目地址 Best Time to Buy and Sell Stock IISay you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum pro...
阅读(1291) 评论(0)

leetcode:121. Best Time to Buy and Sell Stock(Java)解答

转载请注明出处:z_zhaojun的博客 原文地址 题目地址 Best Time to Buy and Sell Stock My Submissions QuestionSay you have an array for which the ith element is the price of a given stock on day i.If you were only permit...
阅读(1953) 评论(0)

leetcode:238. Product of Array Except Self(Java)解答

转载请注明出处:z_zhaojun的博客 原文地址 题目地址 Product of Array Except SelfGiven an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of...
阅读(1320) 评论(0)

leetcode:283. Move Zeroes(Java)解答

转载请注明出处:z_zhaojun的博客 原文地址:http://blog.csdn.net/u012975705 题目地址:https://leetcode.com/problems/move-zeroes/ Move Zeroes Given an array nums, write a function to move all 0's to the end of it while...
阅读(1564) 评论(1)

leetcode:119. Pascal's Triangle II(Java)解答

转载请注明出处:z_zhaojun的博客 原文地址:http://blog.csdn.net/u012975705/ 题目地址:https://leetcode.com/problems/pascals-triangle-ii/ Pascal’s Triangle II Given an index k, return the kth row of the Pascal's tri...
阅读(1565) 评论(0)

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 II Given a linked list, return the node where the cycle be...
阅读(2104) 评论(1)

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 II Given a sorted linked list, delete all...
阅读(1295) 评论(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...
阅读(1730) 评论(0)
    个人资料
    • 访问:155866次
    • 积分:2218
    • 等级:
    • 排名:第18668名
    • 原创:44篇
    • 转载:29篇
    • 译文:0篇
    • 评论:52条
    博客专栏
    友情链接
    最新评论