Easy 在一道Easy题上找到了Bug Free的愉悦感, 因为之前做过Merge Intervals和Meeting Rooms ii, 这道题实在是太简单了。 /** * Definition for an int…
分类:LeetCode
271. Encode and Decode Strings
271- Encode and Decode Strings **Question Editorial Solution My Submissions Total Accepted: 9668 Total Submiss…
LeetCode 15 3Sum 找出数组里面3个数的和等于指定值。
题目:Given an array S of n integers, are there elements a, b, c in …
[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"…
LeetCode | Merge Two Sorted Lists
题目: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing togethe…
[Leetcode] Word Pattern 单词模式
Word Pattern Given a pattern and a string str, find if str follows the same pattern. Examples: pattern = "abba…
【Leetcode】7. Reverse Integer 整数字面反转
1. 题目 Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 2. 思路 如果是负数,先…
力扣(LeetCode)463
题目地址:https://leetcode-cn.com/probl…题目描述:给定一个包含 0 和 1 的二维网格地图,其中 1 表示陆地 0 表示水域。 网格中的格子水平和垂直方向相连(对角线方向不相连)…
Leetcode PHP题解--D20 557. Reverse Words in a String III
557. Reverse Words in a String III 题目链接 557. Reverse Words in a String III 题目分析 题目要求把句子中的每个单词都倒转过来。 思路 这个很简单,用…
10. Regular Expression Matching
/* * 10. Regular Expression Matching QuestionEditorial Solution My Submissions Total Accepted: 86843 Total Sub…