Ola interview question

knapsack problem rotten oranges(bfs shortest path)