Re: [閒聊] 每日leetcode已回收

看板Marginalman作者 (caster )時間1年前 (2024/06/02 19:11), 編輯推噓3(302)
留言5則, 4人參與, 1年前最新討論串310/1554 (看更多)
https://leetcode.com/problems/reverse-string 344. Reverse String 如題 Example 1: Input: s = ["h","e","l","l","o"] Output: ["o","l","l","e","h"] Example 2: Input: s = ["H","a","n","n","a","h"] Output: ["h","a","n","n","a","H"] Python Code: class Solution: def reverseString(self, s: List[str]) -> None: """ Do not return anything, modify s in-place instead. """ s.reverse() 不用reverse就頭尾指針吧 快樂假日 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.137.48.144 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1717326692.A.693.html

06/02 19:12, 1年前 , 1F
one-liner大師...
06/02 19:12, 1F

06/02 19:14, 1年前 , 2F
你是周賽大師 睡過頭哭阿
06/02 19:14, 2F

06/02 19:31, 1年前 , 3F
大師
06/02 19:31, 3F

06/02 19:59, 1年前 , 4F
大師
06/02 19:59, 4F

06/02 20:00, 1年前 , 5F
我早上按submit就炸了
06/02 20:00, 5F
文章代碼(AID): #1cN5DaQJ (Marginalman)
討論串 (同標題文章)
文章代碼(AID): #1cN5DaQJ (Marginalman)