摘要: 问题: 给定一个包含n + 1个整数的数组,其中每一个整数均介于[1, n]之间,求重复的数字。 Example 1: Input: [1,3,4,2,2] Output: 2 Example 2: Input: [3,1,3,4,2] Output: 3 Note: You must not mo 阅读全文
posted @ 2020-04-05 14:14 habibah_chang 阅读(110) 评论(0) 推荐(0)
摘要: 问题: 给定数组,求除本位数字以外所有数字之乘积的新数组 Example: Input: [1,2,3,4] Output: [24,12,8,6] Constraint: It's guaranteed that the product of the elements of any prefix 阅读全文
posted @ 2020-04-05 13:09 habibah_chang 阅读(134) 评论(0) 推荐(0)
摘要: 同样思想的升级版【https://www.cnblogs.com/habibah-chang/p/12743884.html】 问题: 给定StartWord和EndWord,在给定的dict中寻找每次值变换一个字母,最终从StartWord能够推移到EndWord的一个序列步数。 Note: Re 阅读全文
posted @ 2020-04-05 11:38 habibah_chang 阅读(138) 评论(0) 推荐(0)