1652. 解密炸弹
原文英文,约700词,阅读约需3分钟。发表于: 。1652. Defuse the Bomb Difficulty: Easy Topics: Array, Sliding Window You have a bomb to defuse, and your time is running out! Your informer will provide you with a circular array code of length of...
给定一个循环数组和整数k,解密方法为:若k>0,用下一个k个数的和替换当前数;若k<0,用前一个k个数的和替换;若k=0,则替换为0。通过模运算处理循环特性,返回解密后的数组。