File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed
Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 11---
22title : 1825. Seek out MK average value
3- date : ' 2024.01.01 0:00'
3+ date : " 2024.01.01 0:00"
44tags :
55 - - Python
66 - - unsolved
77 - - difficulty
88 - - Multiple set
99abbrlink : 6be57ef7
10+ docId : n38sohi8zlxesl82tgv854kj
1011---
1112
12-
1313# Problem -solving
1414
1515maintain 3 indivual multiset:lower(Minimum kkk indivual数)、middle(Number in the middle)、upper(Most kkk indivual数)。
@@ -33,9 +33,11 @@ if删除后,lower or upper middle的element少于 k indivual,Then from middl
3333操作过程middlemaintain middle 的element和 sum
3434
3535# average value操作
36+
3637average value = sum/(m−2⋅k)sum / (m - 2\cdot k)sum/(m−2⋅k) (Take down)。
3738
3839Code with problems:
40+
3941``` python
4042class MKAverage :
4143
@@ -55,4 +57,4 @@ class MKAverage:
5557 list2 = sorted (list2)
5658 list2 = list2[self .k:len (list2) - self .k]
5759 return sum (list2) // len (list2)
58- ```
60+ ```
Original file line number Diff line number Diff line change 11{
22 "repo" : " InvolutionHell/involutionhell" ,
3- "generatedAt" : " 2025-12-13T15:44:36.447Z " ,
3+ "generatedAt" : " 2025-12-14T03:05:41.786Z " ,
44 "docsDir" : " app/docs" ,
5- "totalDocs" : 141 ,
5+ "totalDocs" : 142 ,
66 "results" : [
77 {
88 "docId" : " ue27z7z95yzw3lhhfj7nit1c" ,
21962196 }
21972197 ]
21982198 },
2199+ {
2200+ "docId" : " n38sohi8zlxesl82tgv854kj" ,
2201+ "path" : " app/docs/CommunityShare/Leetcode/1825求出 MK 平均值_translated.md" ,
2202+ "contributorStats" : {
2203+ "114939201" : 1
2204+ },
2205+ "contributors" : [
2206+ {
2207+ "githubId" : " 114939201" ,
2208+ "contributions" : 1 ,
2209+ "lastContributedAt" : " 2025-12-14T03:00:13.000Z" ,
2210+ "login" : " longsizhuo" ,
2211+ "avatarUrl" : " https://avatars.githubusercontent.com/u/114939201?v=4" ,
2212+ "htmlUrl" : " https://github.com/longsizhuo"
2213+ }
2214+ ]
2215+ },
21992216 {
22002217 "docId" : " chb8ee5s38v8gh751n9e5znj" ,
22012218 "path" : " app/docs/CommunityShare/Leetcode/1828统计一个圆中点的数目_translated.md" ,
You can’t perform that action at this time.
0 commit comments