Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ‘…
分类:LeetCode题目解答
力扣(LeetCode)863
题目地址:https://leetcode-cn.com/probl…题目描述:给定一个二叉树(具有根结点 root), 一个目标结点 target ,和一个整数值 K 。 返回到目标结点 target 距离…
[LeetCode] Integer to Roman 整数转化成罗马数字
Roman numerals are represented by seven different symbols: I, V, X, L, C, …
[LeetCode] Judge Route Circle 判断路线绕圈
Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot make…
[LeetCode] 24 Game 二十四点游戏
You have 4 cards each containing a number from 1 to 9. You need to judge whether they could operated th…
337. House Robber III
The thief has found himself a new place for his thievery again. There is only one entrance to this area, calle…
[LeetCode] String Compression 字符串压缩
Given an array of characters, compress it in-place. The length after compression must always be sm…
LeetCode 241 Different Ways to Add Parentheses
题目描述 Given a string of numbers and operators, return all possible results from computing all the different pos…
[Leetcode] Expression Add Operators 添加运算符
Expression Add Operators Given a string that contains only digits 0-9 and a target value, return all possibili…
力扣(LeetCode)103
题目地址:https://leetcode-cn.com/probl…题目描述:给定一个二叉树,返回其节点值的锯齿形层次遍历。(即先从左往右,再从右往左进行下一层遍历,以此类推,层与层之间交替进行)。 解答:…
130. Surrounded Regions
130. Surrounded Regions 题目 Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surroun…
[LeetCode] Largest Plus Sign 最大的加型符号
In a 2D grid from (0, 0) to (N-1, N-1), every cell contains a 1, except those cells in t…