vib_1's blog

By vib_1, history, 3 months ago, In English,

How to solve the following question

Given an array of Values, Weight, INFINITE capacities of each item, tell the amount of profit we can make. The number of items picked HAS to be a fibonacci number.

Eg.

Num of Items 2

Capacity 200

Wt 100 50

Values 70, 51

ans=(70 * 2)+(50*1);

It's an interview question and one of my friend has asked .The constraints may be 0<=row,col<=100

 
 
 
 
  • Vote: I like it  
  • -14
  • Vote: I do not like it  

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by vib_1 (previous revision, new revision, compare).

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Please specify the source and restriction of the problem.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Please elaborate the problem. I'm unable to understand the question being asked.