1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 23:41:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2023-12-09 19:57:46 +08:00
parent 9bc4722a45
commit 3770b44d1e
4792 changed files with 10889 additions and 10886 deletions

View File

@@ -161,7 +161,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"136.6K\", \"totalSubmission\": \"344.7K\", \"totalAcceptedRaw\": 136594, \"totalSubmissionRaw\": 344733, \"acRate\": \"39.6%\"}",
"stats": "{\"totalAccepted\": \"136.6K\", \"totalSubmission\": \"344.8K\", \"totalAcceptedRaw\": 136614, \"totalSubmissionRaw\": 344773, \"acRate\": \"39.6%\"}",
"hints": [
"The simplest of solutions comes from the basic idea of finding the median given a set of numbers. We know that by definition, a median is the center element (or an average of the two center elements). Given an unsorted list of numbers, how do we find the median element? If you know the answer to this question, can we extend this idea to every sliding window that we come across in the array?",
"Is there a better way to do what we are doing in the above hint? Don't you think there is duplication of calculation being done there? Is there some sort of optimization that we can do to achieve the same result? This approach is merely a modification of the basic approach except that it simply reduces duplication of calculations once done.",