摘要:
LeetCode地址:https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/ 题目描述: 给定一个二叉树,找出其最大深度。 二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。 说明: 叶子节点是指没有子节点的节点。 示例:给 阅读全文
摘要:
LeetCode地址:https://leetcode-cn.com/problems/delete-node-in-a-linked-list/ 描述: 请编写一个函数,使其可以删除某个链表中给定的(非末尾)节点,你将只被给定要求被删除的节点。 现有一个链表 -- head = [4,5,1,9] 阅读全文
摘要:
地址: 描述: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The 阅读全文
摘要:
地址:https://leetcode.com/problems/kth-largest-element-in-an-array/ 描述: Find the kth largest element in an unsorted array. Note that it is the kth large 阅读全文
摘要:
地址:https://leetcode.com/problems/merge-sorted-array/ 描述: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. 阅读全文
摘要:
地址:https://leetcode.com/problems/sort-colors/ 描述: Given an array with n objects colored red, white or blue, sort them in-place so that objects of the 阅读全文
摘要:
地址:https://leetcode.com/problems/remove-element/ 描述: Given an array nums and a value val, remove all instances of that value in-place and return the n 阅读全文
摘要:
地址:https://leetcode.com/problems/move-zeroes/ 项目描述: Given an array nums, write a function to move all 0's to the end of it while maintaining the relat 阅读全文