会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
π+1
博客园
首页
新随笔
联系
管理
订阅
2019年4月14日
给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。
摘要: class Solution { public int[] twoSum(int[] nums, int target) { if(nums == null || nums.length map = new HashMap(); for(int i = 0; i < nums.length; i++){ if(map.cont...
阅读全文
posted @ 2019-04-14 19:17 紫色的雪
阅读(6608)
评论(1)
推荐(0)
公告