A 10-year-old problem

Apparently back in 2015 (10 years ago!) I tried to solve this problem several times, unsuccessfully. I was young and inexperienced, probably. I gave it another try now. The idea is to not have any sort of matrix. Basically, just keep track of the rows and have a hash table storing the strings in each row. As you move the row index, and you append the characters to the end of the strings, everything falls into place quite well. There is one odd case, when the number of rows is one, which doesn't really work in my calculations, hence I handle it separately in the beginning. Problem solved, only took 10 years. Code is down below, cheers, ACC. Zigzag Conversion - LeetCode 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 a...