2020.07专题

LCP 13. 寻宝(Leetcode每日一题-2020.07.29)--抄答案。。。。

Problem 我们得到了一副藏宝图,藏宝图显示,在一个迷宫中存在着未被世人发现的宝藏。 迷宫是一个二维矩阵,用一个字符串数组表示。它标识了唯一的入口(用 ‘S’ 表示),和唯一的宝藏地点(用 ‘T’ 表示)。但是,宝藏被一些隐蔽的机关保护了起来。在地图上有若干个机关点(用 ‘M’ 表示),只有所有机关均被触发,才可以拿到宝藏。 要保持机关的触发,需要把一个重石放在上面。迷宫中有若干个石堆(

97. Interleaving String(Leetcode每日一题-2020.07.18)

Problem Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. Example1 Input: s1 = “aabcc”, s2 = “dbbca”, s3 = “aadbbcbcac” Output: true Example2 Input: s1 = “aabcc”,

96. Unique Binary Search Trees(Leetcode每日一题-2020.07.15)

Problem Given n, how many structurally unique BST’s (binary search trees) that store values 1 … n? Example Solution class Solution {public:int numTrees(int n) {vector<int> dp(n+1,0);dp[0] =

面试题 17.13. Re-Space LCCI(Leetcode每日一题-2020.07.09)

Problem Oh, no! You have accidentally removed all spaces, punctuation, and capitalization in a lengthy document. A sentence like “I reset the computer. It still didn’t boot!” became "iresetthecompute

63. Unique Paths II(Leetcode每日一题-2020.07.06)

Problem A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to rea

44. Wildcard Matching(Leetcode每日一题-2020.07.05)

Problem Given an input string (s) and a pattern §, implement wildcard pattern matching with support for ‘?’ and ‘*’. ‘?’ Matches any single character. ‘*’ Matches any sequence of characters (includ

32. Longest Valid Parentheses(Leetcode每日一题-2020.07.04)

Problem Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring. 来源:力扣(LeetCode) Example1 Input: “(()” Output: 2 Explan