Re: [閒聊] 每日leetcode

看板Marginalman作者 (椒丘單推人)時間1年前 (2024/09/28 21:10), 編輯推噓4(402)
留言6則, 4人參與, 1年前最新討論串919/1554 (看更多)
※ 引述 《DJYOSHITAKA》 之銘言: : class MyCircularDeque: : def insertFront(self, value: int) -> bool: : self.l.insert(0, value) : def insertLast(self, value: int) -> bool: : self.l.append(value) : def deleteFront(self) -> bool: : self.l.pop(0) : def deleteLast(self) -> bool: : self.l.pop() : def getFront(self) -> int: : return self.l[0] : def getRear(self) -> int: : return self.l[-1] : def isEmpty(self) -> bool: : return len(self.l) == 0 : def isFull(self) -> bool: : return len(self.l) == self.k 說到用PY寫哩扣就想起 大學時的肥肥 有次寫不知道什麼sort的題目 我直接 return sort(array) 竟然還給過 當下覺得自己是廢物:( -- https://i.imgur.com/tDUrHwI.gif
-- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.72.245.142 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1727529008.A.445.html

09/28 21:13, 1年前 , 1F
寫py的缺點就是有時候自己都不知道為啥能跑
09/28 21:13, 1F

09/28 21:13, 1年前 , 2F
sorted 對不起
09/28 21:13, 2F

09/28 21:14, 1年前 , 3F
還是np.sort()啊 我也忘了
09/28 21:14, 3F

09/28 21:15, 1年前 , 4F
.sort()
09/28 21:15, 4F

09/28 21:16, 1年前 , 5F
哀 PY怎麼這麼難
09/28 21:16, 5F

09/28 21:17, 1年前 , 6F
寶 我可以跟你一起研究PY
09/28 21:17, 6F
文章代碼(AID): #1c-00mH5 (Marginalman)
討論串 (同標題文章)
文章代碼(AID): #1c-00mH5 (Marginalman)