![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Leetcode
算法刷题
HachiLin
so high so low,so many thing to know.
展开
-
LeetCode (python实现) —— 树
1. 难度:简单104:二叉树的最大深度题目描述给定一个二叉树,找出其最大深度。二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。说明: 叶子节点是指没有子节点的节点。例子给定二叉树 [3,9,20,null,null,15,7] 3 / \ 9 20 / \ 15 7返回它的最大深度3...原创 2020-01-13 21:06:14 · 398 阅读 · 0 评论 -
27.Remove Element
Description Given an array and a value, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do this by modifying the i...原创 2018-03-15 19:32:35 · 168 阅读 · 1 评论 -
2. Add Two Numbers
Description You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numb...原创 2018-03-19 22:38:03 · 169 阅读 · 0 评论 -
80. Remove Duplicates from Sorted Array II
Description Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice? For example: Given sorted array nums = [1,1,1,2,2,3], Your function should return lengt...原创 2018-03-19 22:46:35 · 141 阅读 · 0 评论 -
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 t...原创 2018-03-19 22:49:43 · 131 阅读 · 0 评论 -
118. Pascal's Triangle
Description Given numRows, generate the first numRows of Pascal’s triangle. For example, given numRows = 5,Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4...原创 2018-03-20 19:14:24 · 161 阅读 · 0 评论 -
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 ...原创 2018-03-20 22:55:26 · 157 阅读 · 0 评论