Re: [閒聊] 每日leetcode
58.Length of Last Word
找出字串s裡最後面一個字的長度
想法:沒有
public class Solution {
public int LengthOfLastWord(string s) {
return s.Trim().Split(' ').Last().Length;
}
}
我只會EZ
--
(づ′・ω・)づ
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.220.51.52 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1711937847.A.250.html
→
04/01 10:17,
1年前
, 1F
04/01 10:17, 1F
→
04/01 10:20,
1年前
, 2F
04/01 10:20, 2F
推
04/01 10:38,
1年前
, 3F
04/01 10:38, 3F
→
04/01 10:57,
1年前
, 4F
04/01 10:57, 4F
討論串 (同標題文章)
以下文章回應了本文 (最舊先):
完整討論串 (本文為第 84 之 1548 篇):