Skip to content

commit-live-students/106-indices-pair-sum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Given an array, find the two indices that sum to a specific value.

Constraints

  • Is there exactly one solution?
    • Yes
  • Is there always a solution?
    • Yes
  • Is the array an array of ints?
    • Yes
  • Is the array sorted? No
  • Are negative values possible?
    • Yes
  • Can we assume the inputs are valid?
    • No
  • Can we assume this fits memory?
    • Yes

Instructions:

  • Program should be written in file build.py

  • Function name should be two_sum.

  • Input

     Type:  List, Integer
     Value: [9,12,5,1,13,18,-12,20,7], 16
    
  • Expected Output

      Type:  List
      Value: [0,8]
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages