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?
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?
Is it OK to lookup the solution, understand it, re-implement it or should I spend however long it takes to find it myself
ill just sell my computer and go teach english in china then
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.
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.