By: Jimmy Pan
String[] words = {
"apple", "banana", "cherry", "dog", "elephant", "fish",
"grape", "hat", "igloo", "jacket", "kangaroo",
"lemon", "monkey", "noodle", "orange", "penguin",
"quilt", "rabbit", "snake", "tiger", "umbrella",
"vanilla", "watermelon", "xylophone", "yogurt", "zebra",
"sun", "moon", "star", "flower", "ocean", "mountain",
"river", "cloud", "rain", "snow", "fire", "earth",
"wind", "volcano", "island", "desert", "forest",
"castle", "dragon", "knight", "princess", "wizard",
"unicorn"
};
String[][] words2D = {
{"apple", "banana", "cherry"},
{"dog"},
{"elephant", "fish", "grape", "hat"},
{"igloo", "jacket", "kangaroo"},
{"lemon", "monkey"},
{"noodle"},
{"orange", "penguin", "quilt", "rabbit", "snake"},
{"tiger", "umbrella", "vanilla", "watermelon", "xylophone"},
{"yogurt", "zebra"},
{"sun", "moon", "star", "flower"},
{"ocean"},
{"mountain", "river", "cloud", "rain"},
{"snow"},
{"fire", "earth", "wind", "volcano", "island"},
{"desert", "forest", "castle", "dragon", "knight"},
{"princess", "wizard"},
{"unicorn"}
};
Expected Out For Both Problems
banana
cherry
elephant
igloo
jacket
kangaroo
monkey
noodle
orange
penguin
rabbit
umbrella
vanilla
watermelon
xylophone
yogurtflower
mountain
volcano
island
desert
forestcastle
dragon
knight
princesswizard
unicorn