LeetCode OJ - ZigZag Conversation
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows likethis: (you may want t
1月前210
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows likethis: (you may want t
Problem:Solution:Code:class Solution {public String convert(String s, int numRows) {if (numRows1) return s;StringBuild
题目传送门方法一: 前缀和+后缀和算法原理 需要两个数组。第一个数组存储最左边到第 i 个位置的最大高度(前缀最大值)第二个数组存储最右边到第 i 个位置的最大高度(后缀最大值)最终第 i 个位置的接水量 = min(第 i 位置的前缀最大
文章目录 零、写在前面一、认识自我二、建立信心三、解题报告四、旧题二刷五、沟通交流六、前置知识零、写在前面 当看到这篇文章的时候,确保已经参加过 [万人千题] 九日集训,并且加入 [ 英雄算法联盟合伙人 ] 群, 如果没有参加过也没有关系,