Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
23
def
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
30
def
greedy(item, max_cost, key_func):
Callers
nothing calls this directly
Calls
2
Things
Class · 0.85
append
Method · 0.45
Tested by
no test coverage detected