I know this is a knapsack problem where the weights and values are equal but I think I am making a mistake in my coding logic, since its taking too long to complete even for a p