FCC: Profile Lookup

screen-shot-2017-01-12-at-12-52-42-am

Solution: 

So I thought I got the correct solution pretty quickly but it would only pass 2/5 test cases.  Turned out, it was because I was returning “No such contact” inside the outer if statement..

screen-shot-2017-01-12-at-12-52-23-am

Advertisements
FCC: Profile Lookup

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