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...

Which C++ data type was designed to store Unicode characters?

a. char b. long c. wchar_t d. size_t

Computer Science & Information Technology

Much of personnel security rests on maintaining ____ that complies with all rules and regulations.

A. behavior B. compliance C. an attitude D. a control set

Computer Science & Information Technology

A very light, washed-out company logo displayed behind the text on a document is an example of a(n) ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

What is the best practice for centering a title over multiple columns?

A. Enter the title in the center column of the range B. Use the Merge Title feature C. Use the Merge and Center alignment D. Use the Combine and Center alignment

Computer Science & Information Technology