Given a string containing only three types of characters: ‘(‘, ‘)’ and ‘*…
分类:LeetCode题目解答
[Leetcode] Encode and Decode Strings 字符串编解码
Encode and Decode Strings Design an algorithm to encode a list of strings to a string. The encoded string is t…
LeetCode | Copy List with Random Pointer
题目: A linked list is given such that each node contains an additional random pointer which could point to any …
[Leetcode] Inorder Successor in BST 二叉搜索树中序下一个
Inorder Successor in BST Given a binary search tree and a node in it, find the in-order successor of that node…
【leetcode】25. Reverse Nodes in k-Group 链表按K分段逆序
1. 题目 Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the…
[LeetCode] House Robber III 打家劫舍之三
The thief has found himself a new place for his thievery again. There is only one entrance to this area…
[LeetCode] Basic Calculator III 基本计算器之三
Implement a basic calculator to evaluate a simple expression string. The expression string may contain …
[Leetcode] Course Schedule 课程计划
Course Schedule I There are a total of n courses you have to take, labeled from 0 to n – 1. Some courses…
[Leetcode] Longest Substring Without Repeating Characters 最长唯一子串
Longest Substring Without Repeating Characters 最新更新解法:https://yanjia.me/zh/2018/12/… Given a string, fin…
[LeetCode] Isomorphic Strings 同构字符串
Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic …
[LeetCode] Insert Delete GetRandom O(1) - Duplicates allowed 常数时间内插入删除和获得随机数 - 允许重复
Design a data structure that supports all following operations in average O(1) time. Not…
[LeetCode] Minimum Unique Word Abbreviation 最短的独一无二的单词缩写
A string such as "word" contains the following abbreviations: ["word", "1ord", "w1rd", "wo1d"…