03 2020 档案
摘要:原题链接在这里:https://leetcode.com/problems/rotate-string/ 题目: We are given two strings, A and B. A shift on A consists of taking string A and moving the le
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/flower-planting-with-no-adjacent/ 题目: You have N gardens, labelled 1 to N. In each garden, you want to plant one
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/implement-rand10-using-rand7/ 题目: Given a function rand7 which generates a uniform random integer in the range 1
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/count-different-palindromic-subsequences/ 题目: Given a string S, find the number of different non-empty palindrom
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/validate-stack-sequences/ 题目: Given two sequences pushed and popped with distinct values, return true if and onl
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/product-of-the-last-k-numbers/ 题目: Implement the class ProductOfNumbers that supports two methods: 1. add(int nu
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/flip-string-to-monotone-increasing/ 题目: A string of '0's and '1's is monotone increasing if it consists of some
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/shortest-path-in-a-grid-with-obstacles-elimination/ 题目: Given a m * n grid, where each cell is either 0 (empty)
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps/ 题目: You have a pointer at index 0 in an array of size
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/similar-string-groups/ 题目: Two strings X and Y are similar if we can swap two letters (in different positions) o
阅读全文