217. Flatten the Dungeon Map

Easy · Array

A dungeon map is a 2D array of room names. Flatten it into a single 1D array while preserving the order (row by row, left to right).

Examples

Example 1
Input: [["A","B"],["C","D"]]
Output: ["A","B","C","D"]
Explanation: All rooms in order

Constraints