Skip to content

Commit

Permalink
[Array] Fix space complexity of Two Sum
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi Gu committed Oct 16, 2016
1 parent 2a197cf commit a31700d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Array/TwoSum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Question Link: https://leetcode.com/problems/two-sum/
* Primary idea: Traverse the array and store target - nums[i] in a dict
*
* Time Complexity: O(n), Space Complexity: O(n)
* Time Complexity: O(n), Space Complexity: O(nC2)
*/

class TwoSum {
Expand Down

0 comments on commit a31700d

Please sign in to comment.