Binary Tree Right Side View Given a binary tree, imagine yourself standing on the right side of it, return the…
标签:LeetCode题目解答
【leetcode】98. Validate Binary Search Tree 二叉树是否是中序有序的
1. 题目 Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as fol…
leetcode关于数组的问题,leetcode414-第三大的数,LeetCode:152_Maximum Product Subarray | 最大乘积连续子数组 | Medium
关于数组的几道面试题 [Leetcode] 628. 三个数的最大乘积 解题思路: 这个一开始我是没想到思路的(除了遍历),因为有正负号的问题,后来看了一下别人的思路然后自己写的,思路是这样的: 三个数乘积最大只能有两种…
26. Remove Duplicates from Sorted Array
26. Remove Duplicates from Sorted Array 题目 Given a sorted array, remove the duplicates in-place such that each…
[LeetCode] Count Different Palindromic Subsequences 计数不同的回文子序列的个数
Given a string S, find the number of different non-empty palindromic subsequences in S, and return…
[Leetcode] Max Area of Island 最大岛屿面积
Max Area of Island 最新更新请见:https://yanjia.me/zh/2019/02/… Given a non-empty 2D array grid of 0’s an…
[Leetcode] Count and Say 数个数
Count Consecutive Digits in Integer Count consecutive digits and say it. For example, return 132341 if input i…
[LeetCode] Roman to Integer 罗马数字转化成整数
Roman numerals are represented by seven different symbols: I, V, X, L, C, …
[LeetCode] Permutations II 全排列之二
Given a collection of numbers that might contain duplicates, return all possible unique permutations. E…
[LeetCode] Add Two Numbers II 两个数字相加之二
You are given two linked lists representing two non-negative numbers. The most significant digit comes …
[LeetCode] Construct the Rectangle 构建矩形
For a web developer, it is very important to know how to design a web page’s size. So, given a sp…
[LeetCode] Teemo Attacking 提莫攻击
In LLP world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned con…