算法的重要性,我就不多说了吧,想去大厂,就必须要经过基础知识和业务逻辑面试+算法面试。所以,为了提高大家的算法能力,这个公众号后续每天带大家做一道算法题,题目就从LeetCode上面选 !今天和大家聊的问题叫做 Z字形变换 ,这道题很有意思,我们先来看题面:题意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)https://leetcode.com/problems/zigzag-conversion/翻译给定一个字符串,将它变成蛇形输出。这个蛇形的概念比较抽象,我们需要结合样例才能理解。样例P A H NA P L S I I GY I RAnd then read line by line: "PAHNAPLSIIGYIR"Write the code that will take a string and make this conversion given a number of row
………………………………