106. 找到和为0的两个数
分享给更多人
容易 -通过 / -执行
给定一个整数数组,请找出两个和为0的数字,返回其位置。
可能有多组结果,任意一组均可。如果没有,则返回null
。
findTwo([1,2,3,-1])findTwo([1,2,3,-1,-2,0])findTwo([1,2,3,4])// null
容易 -通过 / -执行
给定一个整数数组,请找出两个和为0的数字,返回其位置。
可能有多组结果,任意一组均可。如果没有,则返回null
。
findTwo([1,2,3,-1])findTwo([1,2,3,-1,-2,0])findTwo([1,2,3,4])// null