1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 07:21:40 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 15:21:05 +08:00
parent b84ae535b7
commit e730aa6794
2244 changed files with 8703 additions and 59499 deletions

View File

@@ -11,7 +11,7 @@
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 9788,
"likes": 9807,
"dislikes": 527,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Substring with Concatenation of All Words\", \"titleSlug\": \"substring-with-concatenation-of-all-words\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Minimum Size Subarray Sum\", \"titleSlug\": \"minimum-size-subarray-sum\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Sliding Window Maximum\", \"titleSlug\": \"sliding-window-maximum\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Permutation in String\", \"titleSlug\": \"permutation-in-string\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Smallest Range Covering Elements from K Lists\", \"titleSlug\": \"smallest-range-covering-elements-from-k-lists\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Minimum Window Subsequence\", \"titleSlug\": \"minimum-window-subsequence\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"723K\", \"totalSubmission\": \"1.9M\", \"totalAcceptedRaw\": 722986, \"totalSubmissionRaw\": 1864392, \"acRate\": \"38.8%\"}",
"stats": "{\"totalAccepted\": \"724.2K\", \"totalSubmission\": \"1.9M\", \"totalAcceptedRaw\": 724165, \"totalSubmissionRaw\": 1866862, \"acRate\": \"38.8%\"}",
"hints": [
"Use two pointers to create a window of letters in <b>S</b>, which would have all the characters from <b>T</b>.",
"Since you have to find the minimum window in <b>S</b> which has all the characters from <b>T</b>, you need to expand and contract the window using the two pointers and keep checking the window for all the characters. This approach is also called Sliding Window Approach.\r\n\r\n<br><br>\r\n<pre>\r\nL ------------------------ R , Suppose this is the window that contains all characters of <b>T</b> \r\n \r\n&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp L----------------- R , this is the contracted window. We found a smaller window that still contains all the characters in <b>T</b>\r\n\r\nWhen the window is no longer valid, start expanding again using the right pointer. </pre>"