Leetcode 6. ZigZag Conversion

題目描述:之字打印出字符串,並返回結果。 題目鏈接:Leetcode 6. ZigZag Conversion 思路就是初始化n行字符串,然後像搜索一樣一個上一個下去搜索。 代碼如下 class Solution(object): def convert(self, s, numRows): """ :type s: str :type numRows: int :rtyp
相關文章
相關標籤/搜索