TikTok Interview Question

1) Variant of knapsack problem 2) Variant of a breadth first search graph algorithm