What is the algorithm approach for the problem of: "Given two jugs with the maximum capacity of i and j gallons respectively. Measure n gallons of water using these two jugs."

a. Dynamic programming
b. Greedy
c. Divide and conquer
d. Sorting

a. Dynamic programming

Computer Science & Information Technology

You might also like to view...

The Open dialog box uses file names to filter the list of files so that it displays only those files that can be opened using the current application.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Which classes implement the Comparable interface?

What will be an ideal response?

Computer Science & Information Technology