1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-06 07:51: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

@@ -34,7 +34,7 @@
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"12.4K\", \"totalSubmission\": \"17K\", \"totalAcceptedRaw\": 12439, \"totalSubmissionRaw\": 16988, \"acRate\": \"73.2%\"}",
"stats": "{\"totalAccepted\": \"12.5K\", \"totalSubmission\": \"17K\", \"totalAcceptedRaw\": 12460, \"totalSubmissionRaw\": 17015, \"acRate\": \"73.2%\"}",
"hints": [
"Notice that in order to obtain the minimum swaps, we should focus on the smallest element that is the leftmost and the largest element that is the rightmost.",
"We can take those elements and greedily only do swaps that bring them closer to their respective end positions."