String[][] words = { {"I", "love", "coding"}, {"Java", "is", "fun"}, {"Let's", "put", "it", "together"} }; Expected output:
Example:
def combine(arr): result = [] for row in arr: for item in row: result.append(item) return " ".join(result)
Or using StringBuilder for efficiency: