A bandit burgalurizing a house finds X items. Each item weights y pounds. The bandit can carry at most Z pounds in his loot bag for some integer Z. Write an algorithm to determine which items to take to maximize the weight of his loot bag. He cannot take a fraction of an item and each item must be taken, or left behind. Loot bag size is Z and and the input is an array of item wieghts as integers.