伪程序员的世界

Debug myself and debug the world!


  • 首页

  • 归档

  • 分类

  • 标签

  • 搜索

LeetCode 104. Maximum Depth of Binary Tree

发表于 2017-12-18 | 分类于 算法 , LeetCode
字数统计: 2.7k | 阅读时长≈ 0:03

LeetCode 104. Maximum Depth of Binary Tree

Description:

Given a binary tree, find its maximum depth.

The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.

阅读全文 »

LeetCode 101. Symmetric Tree

发表于 2017-12-16 | 分类于 算法 , LeetCode
字数统计: 6.6k | 阅读时长≈ 0:07

LeetCode 101. Symmetric Tree

Description:

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).

阅读全文 »

LeetCode 100.Same Tree

发表于 2017-12-16 | 分类于 算法 , LeetCode
字数统计: 2.2k | 阅读时长≈ 0:02

LeetCode 100.Same Tree

Description:

Given two binary trees, write a function to check if they are the same or not.

Two binary trees are considered the same if they are structurally identical and the nodes have the same value.

阅读全文 »

LeetCode 35. Search Insert Position

发表于 2017-12-14 | 分类于 算法 , LeetCode
字数统计: 1.2k | 阅读时长≈ 0:01

LeetCode 35. Search Insert Position

Description:

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
You may assume no duplicates in the array.

阅读全文 »

LeetCode 88. Merge Sorted Array

发表于 2017-12-14 | 分类于 算法 , LeetCode
字数统计: 956 | 阅读时长≈ 0:01

LeetCode 88. Merge Sorted Array

Description:

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
Note:
You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional elements from nums2. The number of elements initialized in nums1 and nums2 are m and n respectively.

阅读全文 »

LeetCode 119. Pascal's Triangle II

发表于 2017-12-14 | 分类于 算法 , LeetCode
字数统计: 1.7k | 阅读时长≈ 0:02

LeetCode 119. Pascal’s Triangle II

Description:

Given an index k, return the kth row of the Pascal’s triangle.

For example, given k = 3,
Return [1,3,3,1].

阅读全文 »

LeetCode 118. Pascal's Triangle

发表于 2017-12-14 | 分类于 算法 , LeetCode
字数统计: 1.4k | 阅读时长≈ 0:01

LeetCode 118. Pascal’s Triangle

Description:

Given numRows, generate the first numRows of Pascal’s triangle.

阅读全文 »

LeetCode 122. Best Time to Buy and Sell Stock II

发表于 2017-12-13 | 分类于 算法
字数统计: 1.3k | 阅读时长≈ 0:01

LeetCode 122. Best Time to Buy and Sell Stock II

Description:

Say 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 profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times). However, you may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).

阅读全文 »

LeetCode 26.Remove Duplicates from Sorted Array

发表于 2017-12-12 | 分类于 算法 , LeetCode
字数统计: 1.3k | 阅读时长≈ 0:01

LeetCode 26.Remove Duplicates from Sorted Array

Description:

Given a sorted array, remove the duplicates in-place such that each element appear only once and return the new length.

Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.

阅读全文 »

LeetCode 189.Rotate Array

发表于 2017-12-12 | 分类于 算法 , LeetCode
字数统计: 1.6k | 阅读时长≈ 0:02

LeetCode 189.Rotate Array

Description:

Rotate an array of n elements to the right by k steps.

For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].

阅读全文 »
1…789…11
linjiafengyang

linjiafengyang

Debug myself and debug the world!

106 日志
7 分类
3 标签
GitHub CSDN
© 2019 linjiafengyang | 394k | 6:34