这是悦乐书的第252次更新,第265篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第119题(顺位题号是521)。给定一组两个字符串,您需要找到这组两个字符串中最长的不同子序列。最长的不同子…
分类:LeetCode
LeetCode刷题之Length of Last Word
Problem Given a string s consists of upper/lower-case alphabets and empty space characters ‘ ‘, re…
[LeetCode] Lonely Pixel I 孤独的像素之一
Given a picture consisting of black and white pixels, find the number of black lonely pixels.…
LeetCode | Sort List
题目: Sort a linked list in O ( n log n ) time using constant space complexity. 思路: 合并排序法。 代码:…
LeetCode | Evaluate Reverse Polish Notation(逆波兰式求值)
Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +,&nb…
242. Valid Anagram
242. Valid Anagram 题目: https://leetcode.com/problems/valid-anagram/ 难度 : Easy 对Python来说,又是一块蛋糕,不本地测试 就是这么自信 cl…
[剑指offer] 二叉树的镜像
题目描述 操作给定的二叉树,将其变换为源二叉树的镜像。 输入描述: 二叉树的镜像定义: 源二叉树 8 / \ 6 10 / \ / \ 5 7 9 11 镜像二叉树 8 / \ 10 6 / \ / \ 11 9 7 5…
[LeetCode] Minimum Path Sum 最小路径和, Dungeon Game 地牢游戏
Given a m x n grid filled with non-negative numbers, find a path from top left to b…
[LeetCode] IPO 上市
Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capita…
[LeetCode] Coin Change 2 硬币找零之二
You are given coins of different denominations and a total amount of money. Write a function to compute…
[LeetCode] To Lower Case 转为小写
Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowerc…
016 3Sum Closest[M]
1 题目描述 Given an array S of n integers, find three integers in S such that the sum is closest to a given number…