+ 2

Make a function which returns the maximum value

You are a renowned hacker who has recently found a bug within Flipmart. For a given amount of time, you can steal items from their inventory. However, each inventory item has a price and takes up a certain time to be available. Make a function which returns the maximum value of the inventory that can be stolen. For example function name : hackFlipmart Time available : 100 seconds Total inventory available : 4 items Time taken and value of each inventory : Item 1 : 10 seconds : Rs. 50 Item 2 : 14 seconds : Rs. 100 Item 3 : 3 seconds : Rs. 20 Item 4 : 18 seconds : Rs. 150 This entire data can be represented as [[10,50], [14,100], [3,20], [18, 150]] Also ensure that you have taken fringe cases into consideration. Any item cannot have a zero price and time taken also cannot be zero.

24th Nov 2017, 3:24 PM
Srivatshan.P.K
Srivatshan.P.K - avatar
1 ответ
0
code write a method that takes a year and returns the number of days in that year write a tast program that displays the number of days in years from 2017 to 2037?! How to write this code plez
25th Nov 2017, 5:05 PM
Ahad