Flatten 2D Array Problem
Flatten 2D Array Problem — ExecCode School DSA Practice
Solve the Flatten 2D Array problem on ExecCode. Free online school DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Given a 2D array of integers, print all its elements in a single line, ordered row by row. Your task is to understand the rule and print the correct answer. You are working on Flatten 2D Array.
Examples
Input 2 3 1 2 3 4 5 6; Output 1 2 3 4 5 6. Input 3 2 7 8 9 1 2 3; Output 7 8 9 1 2 3
Constraints
1<=N,M<=100
Practice Flatten 2D Array free on ExecCode. Browse DSA problems, topic map, and placement guides.