Given an integer array with even length, where different numbers in this array represent diff…
分类:LeetCode题目解答
[LeetCode] Coin Path 硬币路径
Given an array A (index starts at 1) consisting of N integers: A1, A2, …, AN …
[LeetCode] Trim a Binary Search Tree 修剪一棵二叉搜索树
Given a binary search tree and the lowest and highest boundaries as L and R, trim the tr…
LeetCode | Multiply Strings
题目: Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numb…
[LeetCode] Ransom Note 赎金条
Given an arbitrary ransom note string and another string containing letters from all the …
162. Find Peak Element
A peak element is an element that is greater than its neighbors.Given an input array nums, where nums[i] ≠ num…
43. Multiply Strings
43. Multiply Strings 题目 Given two non-negative integers num1 and num2 represented as strings, return the produ…
[LeetCode] Max Increase to Keep City Skyline 保持城市天际线的最大增高
In a 2 dimensional array grid, each value grid[i][j] represents the height of a building…
LeetCode 105 Construct Binary Tree from Preorder and Inorder Traversal
题目描述 Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that dupl…
[LeetCode] Word Abbreviation 单词缩写
Given an array of n distinct non-empty strings, you need to generate minimal possible abbrevi…
[LeetCode] Valid Triangle Number 合法的三角形个数
Given an array consists of non-negative integers, your task is to count the number of triplets chosen f…
[LeetCode] Find Pivot Index 寻找中枢点
Given an array of integers nums, write a method that returns the “pivot” index of this…