leetcode_6. ZigZag Conversion ? 待解决
2017-11-11 11:47
274 查看
The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
P A H N
A P L S I I G
Y I R
And then read line by line: “PAHNAPLSIIGYIR”
Write the code that will take a string and make this conversion given a number of rows:
string convert(string text, int nRows);
convert(“PAYPALISHIRING”, 3) should return “PAHNAPLSIIGYIR”.
提示:提交代码后,需要用简洁的语言解释一下代码思路~ 谢谢
历史题目和总结见公众号「每日一道算法题」
https://leetcode.com/problems/zigzag-conversion/description/
思路:
P A H N
A P L S I I G
Y I R
And then read line by line: “PAHNAPLSIIGYIR”
Write the code that will take a string and make this conversion given a number of rows:
string convert(string text, int nRows);
convert(“PAYPALISHIRING”, 3) should return “PAHNAPLSIIGYIR”.
提示:提交代码后,需要用简洁的语言解释一下代码思路~ 谢谢
历史题目和总结见公众号「每日一道算法题」
https://leetcode.com/problems/zigzag-conversion/description/
思路:
相关文章推荐
- Leetcode 6 ZigZag Conversion 字符串处理
- leetcode ZigZag Conversion
- leetcode6:Zigzag Conversion@Python
- leetcode笔记--ZigZag Conversion
- [Leetcode]ZigZag Conversion 笨方法
- leetcode ------ZigZag Conversion (6)
- leetcode:ZigZag Conversion 曲线转换
- 006 ZigZag Conversion [Leetcode]
- LeetCode---(6)ZigZag Conversion
- [Leetcode]6. ZigZag Conversion @python
- [leetcode]ZigZag Conversion @ Python
- leetcode ZigZag Conversion
- LeetCode[6] ZigZag Conversion(java)
- LeetCode 6 ZigZag Conversion(规律)
- 【leetcode】 ZigZag Conversion
- LeetCode ZigZag Conversion
- [编程练习]ZigZag Conversion <LeetCode-6>
- LeetCode之ZigZag Conversion
- [LeetCode][Java] ZigZag Conversion
- leetcode ZigZag Conversion