算法
Java
Leetcode
Golang
Java
Leetcode
Golang
Question
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
See it on Leetcode
|
|
Hint
You may assume that each input would have exactly one solution.
Solution #1 Brute Force - 38ms / 59ms
- java
- go
1 |
public class { |
Solution #2 One-pass Hash Table - 7ms / 9ms
- java
- go
1 |
public class { |
近期评论