MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / build_menu

Function build_menu

other/greedy.py:23–27  ·  view source on GitHub ↗
(name, value, weight)

Source from the content-addressed store, hash-verified

21
22
23def build_menu(name, value, weight):
24 menu = []
25 for i in range(len(value)):
26 menu.append(Things(name[i], value[i], weight[i]))
27 return menu
28
29
30def greedy(item, max_cost, key_func):

Callers

nothing calls this directly

Calls 2

ThingsClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected