upd
This commit is contained in:
@@ -58,13 +58,13 @@ Explanation: ".*" means "zero or more (*) of any character (.)".
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 10 :lc-lang python3
|
||||
class Solution:
|
||||
def isMatch(self, s: str, p: str) -> bool:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 10
|
||||
class Solution {
|
||||
public:
|
||||
bool isMatch(string s, string p) {
|
||||
|
||||
@@ -40,13 +40,13 @@ Explanation: From the top-left corner, there are a total of 3 ways to reach the
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 62 :lc-lang python3
|
||||
class Solution:
|
||||
def uniquePaths(self, m: int, n: int) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 62
|
||||
class Solution {
|
||||
public:
|
||||
int uniquePaths(int m, int n) {
|
||||
|
||||
@@ -52,13 +52,13 @@ exection -> execution (insert 'u')
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 72 :lc-lang python3
|
||||
class Solution:
|
||||
def minDistance(self, word1: str, word2: str) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 72
|
||||
class Solution {
|
||||
public:
|
||||
int minDistance(string word1, string word2) {
|
||||
|
||||
@@ -64,13 +64,13 @@ Output: true
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 97 :lc-lang python3
|
||||
class Solution:
|
||||
def isInterleave(self, s1: str, s2: str, s3: str) -> bool:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 97
|
||||
class Solution {
|
||||
public:
|
||||
bool isInterleave(string s1, string s2, string s3) {
|
||||
|
||||
@@ -48,13 +48,13 @@ babgbag
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 115 :lc-lang python3
|
||||
class Solution:
|
||||
def numDistinct(self, s: str, t: str) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 115
|
||||
class Solution {
|
||||
public:
|
||||
int numDistinct(string s, string t) {
|
||||
|
||||
+2
-2
@@ -41,13 +41,13 @@ Output: 0
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 309 :lc-lang python3
|
||||
class Solution:
|
||||
def maxProfit(self, prices: List[int]) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 309
|
||||
class Solution {
|
||||
public:
|
||||
int maxProfit(vector<int>& prices) {
|
||||
|
||||
@@ -43,13 +43,13 @@ Output: 10
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 312 :lc-lang python3
|
||||
class Solution:
|
||||
def maxCoins(self, nums: List[int]) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 312
|
||||
class Solution {
|
||||
public:
|
||||
int maxCoins(vector<int>& nums) {
|
||||
|
||||
+2
-2
@@ -51,13 +51,13 @@ Output: 1
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 329 :lc-lang python3
|
||||
class Solution:
|
||||
def longestIncreasingPath(self, matrix: List[List[int]]) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 329
|
||||
class Solution {
|
||||
public:
|
||||
int longestIncreasingPath(vector<vector<int>>& matrix) {
|
||||
|
||||
@@ -50,13 +50,13 @@ Output: 1
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 494 :lc-lang python3
|
||||
class Solution:
|
||||
def findTargetSumWays(self, nums: List[int], target: int) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 494
|
||||
class Solution {
|
||||
public:
|
||||
int findTargetSumWays(vector<int>& nums, int target) {
|
||||
|
||||
@@ -59,13 +59,13 @@ Output: 1
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 518 :lc-lang python3
|
||||
class Solution:
|
||||
def change(self, amount: int, coins: List[int]) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 518
|
||||
class Solution {
|
||||
public:
|
||||
int change(int amount, vector<int>& coins) {
|
||||
|
||||
@@ -52,13 +52,13 @@ Explanation: There is no such common subsequence, so the result is 0.
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 1143 :lc-lang python3
|
||||
class Solution:
|
||||
def longestCommonSubsequence(self, text1: str, text2: str) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 1143
|
||||
class Solution {
|
||||
public:
|
||||
int longestCommonSubsequence(string text1, string text2) {
|
||||
|
||||
@@ -57,13 +57,13 @@ Output: 68
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 1220 :lc-lang python3
|
||||
class Solution:
|
||||
def countVowelPermutation(self, n: int) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 1220
|
||||
class Solution {
|
||||
public:
|
||||
int countVowelPermutation(int n) {
|
||||
|
||||
+2
-2
@@ -52,13 +52,13 @@ Explanation: It is optimal to choose the subsequence [6,1,5] with alternating su
|
||||
Write your approach here.
|
||||
|
||||
** TODO Python
|
||||
#+begin_src python
|
||||
#+begin_src python :lc-problem 1911 :lc-lang python3
|
||||
class Solution:
|
||||
def maxAlternatingSum(self, nums: List[int]) -> int:
|
||||
#+end_src
|
||||
|
||||
** TODO C++
|
||||
#+begin_src cpp
|
||||
#+begin_src cpp :lc-problem 1911
|
||||
class Solution {
|
||||
public:
|
||||
long long maxAlternatingSum(vector<int>& nums) {
|
||||
|
||||
Reference in New Issue
Block a user