MCPcopy Create free account
hub / github.com/Flamewaker/JavaPersonalSummary / twoSum

Method twoSum

Code/leetcode/hotandtop/LeetCode1.java:17–30  ·  view source on GitHub ↗

给定一个未排序的数组,找到两个数使得它们相加之和等于目标数。 构建索引map,判断 target - nums[i] 是否在数组中

(int[] nums, int target)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected