mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 01:03:01 +02:00
CONTRACTS: Fix nbsp rendering as text rather than a space (#2225)
This commit is contained in:
@@ -12,30 +12,25 @@ export const spiralizeMatrix: Pick<CodingContractTypes, CodingContractName.Spira
|
||||
// for (const line of n) {
|
||||
// d += `${line.toString()},\n`;
|
||||
// }
|
||||
d += " [\n";
|
||||
d += " [\n";
|
||||
d += n
|
||||
.map(
|
||||
(line: number[]) =>
|
||||
" [" +
|
||||
line.map((x: number) => `${x}`.padStart(2, " ")).join(",") +
|
||||
"]",
|
||||
)
|
||||
.map((line: number[]) => " [" + line.map((x: number) => `${x}`.padStart(2, " ")).join(",") + "]")
|
||||
.join("\n");
|
||||
d += "\n ]\n";
|
||||
d += "\n ]\n";
|
||||
d += [
|
||||
"\nHere is an example of what spiral order should be:\n\n",
|
||||
" [\n",
|
||||
" [1, 2, 3]\n",
|
||||
" [4, 5, 6]\n",
|
||||
" [7, 8, 9]\n",
|
||||
" ]\n\n",
|
||||
" [\n",
|
||||
" [1, 2, 3]\n",
|
||||
" [4, 5, 6]\n",
|
||||
" [7, 8, 9]\n",
|
||||
" ]\n\n",
|
||||
"Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\n\n",
|
||||
"Note that the matrix will not always be square:\n\n",
|
||||
" [\n",
|
||||
" [1, 2, 3, 4]\n",
|
||||
" [5, 6, 7, 8]\n",
|
||||
" [9, 10, 11, 12]\n",
|
||||
" ]\n\n",
|
||||
" [\n",
|
||||
" [1, 2, 3, 4]\n",
|
||||
" [5, 6, 7, 8]\n",
|
||||
" [9, 10, 11, 12]\n",
|
||||
" ]\n\n",
|
||||
"Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]",
|
||||
].join(" ");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user