![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
constructive algorithms
野生程序猿RW
2020年毕业于台湾科技大学(Taiwan Tech),后端开发工程师一枚。
展开
-
954. 二倍数对数组(map统计次数)
954. 二倍数对数组 给定一个长度为偶数的整数数组 arr,只有对 arr 进行重组后可以满足 “对于每个 0 <= i < len(arr) / 2,都有 arr[2 * i + 1] = 2 * arr[2 * i]” 时,返回 true;否则,返回 false。 示例 1: 输入:arr = [3,1,3,6] 输出:false 示例 2: 输入:arr = [2,1,2,6] 输出:false 示例 3: 输入:arr = [4,-2,2,-4] 输出:true 解释:可以用 [-2,原创 2022-04-01 23:17:06 · 455 阅读 · 0 评论 -
6. ZigZag Conversion(constructive algorithms,图像规律或者等差数列解)
6. ZigZag Conversion 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 l原创 2022-03-01 23:39:38 · 63 阅读 · 0 评论