A 2d grid map of m rows and n columns is initially filled with water. We may perfor…
标签:LeetCode题目解答
[Algo] Anagram Substring Search 变形词子串
Anagram Substring Search Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[…
[Leetcode] Surrounded Regions 找出被包围的区域
Surrounded Regions Given a 2D board containing ‘X’ and ‘O’, capture all regionssurroun…
139. Word Break
欢迎fork and star:Nowcoder-Repository-github 139. Word Break 题目 Given a non-empty string s and a dictionary word…
[LeetCode] Design Search Autocomplete System 设计搜索自动补全系统
Design a search autocomplete system for a search engine. Users may input a sentence (at least one word …
[LeetCode] Bricks Falling When Hit 碰撞时砖头掉落
We have a grid of 1s and 0s; the 1s in a cell represent bricks. A brick will not drop if and only…
LeetCode 219 Contains Duplicate II
题目描述 Given an array of integers and an integer k, find out whether there are two distinct indices i and j in t…
151. Reverse Words in a String
Given an input string, reverse the string word by word.Example: Input: "the sky is blue", Output: "blue is sky…
[LeetCode] Number of 1 Bits 位1的个数
Write a function that takes an unsigned integer and returns the number of ’1′ bits it has …
[LeetCode] Strobogrammatic Number 对称数
A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside dow…
[LeetCode] Strong Password Checker 密码强度检查器
A password is considered strong if below conditions are all met: It has at least 6 characters and at mo…
LeetCode 274 H-Index
题目描述 Given an array of citations (each citation is a non-negative integer) of a researcher, write a function t…