Self-learning programming week 6

Self-learning programming week 6

Am I supposed to be able to figure this out by myself? Am I retarded? Should I just go get a manual job?

Attached: nobrain.png (682x733, 37K)

Is it OK to lookup the solution, understand it, re-implement it or should I spend however long it takes to find it myself

Attached: 1545789924624.jpg (645x729, 48K)

ill just sell my computer and go teach english in china then

Attached: 1545788655702.png (324x362, 45K)

Am I also a brainlet? In the example, how is the answer 2? Should it not be 1 since only one operation was required; the act of filling the second jug with the contents of the third jug (8 - 3 = 5). The first jug started empty, so that doesn't have any action.

Attached: 1517170539354.jpg (480x480, 22K)

Pretty sure branch and bound is the way to go. No way you'll find this by yourself.

Pick up a book and read.

The second jug holds five liters though. You have to go C -> A to get the three liters and them pour them into B.

A,B,C
[3,5,8]

>water is poured from one jug to another until one of the jugs is either empty or full
1. Pour C into A
2. Pour A into B

Oh lol I didn't read the part about fully emptying the jug. Thought you could half empty them

Never look at the solution for these kinds of exercises, you'll learn nothing.