Amazon 2012 Karakoram

It’s kind of fun,

This one was classic question, 2’s complement.

Snip20130318 2

Here we go.

Snip20130318 6

And I failed on Question 2, also classic knapsack problem transform to coins change,

Snip20130318 4

My answer seems correct, but it did not. I didn’t look carefully,

I just missed the line “(you can use as many coins you want)”

Snip20130318 8

The correct answer should be comment out the line #17

 

Advertisements

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