Two Sum II

Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.

CheckPoint:  if (numbers != null && numbers.length > 1) {throw new IllegalArgumentException(“No solution!”);}

1st:

Screen Shot 2017-10-03 at 11.19.34 PM.png

2nd:

Screen Shot 2017-10-03 at 11.27.05 PM.png

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s