关闭

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].思路:优先添...
阅读(1100) 评论(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...
阅读(1178) 评论(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...
阅读(1974) 评论(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...
阅读(1251) 评论(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...
阅读(1849) 评论(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...
阅读(1280) 评论(0)
    个人资料
    • 访问:147737次
    • 积分:2147
    • 等级:
    • 排名:第18795名
    • 原创:44篇
    • 转载:29篇
    • 译文:0篇
    • 评论:52条
    博客专栏
    友情链接
    最新评论