Roman numerals are represented by seven different symbols: I, V, X, L, C, …
分类:LeetCode
[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 | Generate Parentheses(生成括号)
Given n pairs of parentheses, write a function to generate all combinations of well-formed parenthes…
c语言 递归实现八皇后算法
#include <stdio.h> #include <stdlib.h> int count; //递归法实现八皇后问题 //参数row表示起始行,参数n表示列数 //参数(*chess)[8…
[LeetCode] 7. Reverse Integer 题解
问题描述 给定一个 32 位有符号整数,将每一位的数字反序 例1: 输入:123 输出:321 例2: 输入:-123 输出:-321 例3: 输入:120 输出:21 注意: 假设我们使用的是 32 位系统,且只能处理…
[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…题目描述:给定一个二叉树,返回其节点值的锯齿形层次遍历。(即先从左往右,再从右往左进行下一层遍历,以此类推,层与层之间交替进行)。 解答:…
LeetCode | Reorder List(链表重新排序)
Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must …