コード例 #1
0
        public void TestZigzag()
        {
            var r = ZigZag.Zigzag1("PAYPALISHIRING", 4);

            Assert.AreEqual(r, "PINALSIGYAHRPI");

            r = ZigZag.Zigzag2("PAYPALISHIRING", 3);
            Assert.AreEqual(r, "PAHNAPLSIIGYIR");
        }