Given a rectangular matrix of characters, add a border of asterisks(*
) to it.
- For
picture = [ "abc", "ded" ]
- The output should be
addBorder(picture) = [ "*****", "*abc*", "*ded*", "*****" ]
-
[execution time limit] 5 seconds (ts)
-
[input] array.string
picture
- Guaranteed constraints:
$1 \le picture.length \le 100$ $1 \le picture[i].length \le 100$
- Guaranteed constraints:
-
[output] array.string
- The same matrix of characters, framed with a border of asterisks of width
1
.
- The same matrix of characters, framed with a border of asterisks of width