Re: [閒聊] 每日leetcode

看板Marginalman作者 (franchouchouISBEST)時間1年前 (2024/10/02 13:04), 編輯推噓1(102)
留言3則, 3人參與, 1年前最新討論串931/1554 (看更多)
早早早 天氣這麼好該出去完唄 別捲了== def arrayRankTransform(self, arr: List[int]) -> List[int]: mp = {} for i,val in enumerate(sorted(arr)): if val not in mp: mp[val] = len(mp)+1 ans = [] for num in arr: ans.append(mp[num]) return ans -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.229.37.69 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1727845454.A.932.html

10/02 13:05, 1年前 , 1F
卷三小
10/02 13:05, 1F

10/02 13:05, 1年前 , 2F
卷三小
10/02 13:05, 2F

10/02 13:05, 1年前 , 3F
卷三小
10/02 13:05, 3F
文章代碼(AID): #1c_DHEao (Marginalman)
討論串 (同標題文章)
文章代碼(AID): #1c_DHEao (Marginalman)