MathWorks interview question

Leetcode questions: 1) BFS 2) basic backpack