TikTok Interview Question

Solve two grid problems - number of islands and minimum cost path