38. 報數

38. 報數 解法一:暴力解法 列出30種case的情況,最後return res。 解法二:遞歸 n==1爲「1」是初始條件。Strlast=countAndSay(n-1)遞推表達式,strlast爲上一個字符串。
相關文章
相關標籤/搜索