ThoughtSpot Interview Question

Hackerank 3 problems, including graph, advance dividing arrays, dp