Google Onsite
Anonymous User
2981

I was recently asked this in the Google Onsite round. Can anyone help with this question?

Given the water capacity for each of n unmarked buckets in the form of an array, find all the ways a target quantity of water can be measured. Eg, buckets = [3,5] Target = 4. Output : (+5,+5,-3,-3), (+3,+3,+3-5) etc..

Comments (10)