水下功夫做透,水上才能顺风顺水。

两数之和

给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 target 的那 两个 整数,并返回它们的数组下标public int[] twoSum(int[] nums, int target) { int[] a = new int[2]; Map<Intege
posted @ 2022-03-05 11:49  北方寒士  阅读(11)  评论(0编辑  收藏  举报