235. Lowest Common Ancestor of a Binary Search Tree 题目: https://leetcode.com/problems/lowest-common-ancestor-o…
分类:LeetCode
[LeetCode] Longest Valid Parentheses 最长有效括号
Given a string containing just the characters '(' and ')', find the length of the longes…
[LeetCode] Number of Islands II 岛屿的数量之二
A 2d grid map of m rows and n columns is initially filled with water. We may perfor…
[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…
LeetCode算法题-Trim a Binary Search Tree(Java实现)
这是悦乐书的第284次更新,第301篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第152题(顺位题号是669)。给定二叉搜索树以及L和R的最低和最高边界,修剪树以使其所有元素位于[L,R]…
Leetcode 132. Palindrome Partitioning II
Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum c…
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…