Leetcode
文章平均质量分 52
算法刷题
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 · 591 阅读 · 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 · 226 阅读 · 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 · 250 阅读 · 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 · 230 阅读 · 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 · 180 阅读 · 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 · 230 阅读 · 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 · 229 阅读 · 0 评论
分享