Blue Flames interview question

Dancing number array question which is of difficulty easy