mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
Fix a few bugs with Coding Contracts
This commit is contained in:
parent
2b3c58a17b
commit
b6070ca9c9
2
dist/engine.bundle.js
vendored
2
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -25,7 +25,7 @@ export interface ICodingContractTypeMetadata {
|
|||||||
function removeBracketsFromArrayString(str: string) {
|
function removeBracketsFromArrayString(str: string) {
|
||||||
let strCpy: string = str;
|
let strCpy: string = str;
|
||||||
if (strCpy.startsWith("[")) { strCpy = strCpy.slice(1); }
|
if (strCpy.startsWith("[")) { strCpy = strCpy.slice(1); }
|
||||||
if (strCpy.endsWith("]")) { strCpy = strCpy.slice(-1); }
|
if (strCpy.endsWith("]")) { strCpy = strCpy.slice(0, -1); }
|
||||||
|
|
||||||
return strCpy;
|
return strCpy;
|
||||||
}
|
}
|
||||||
@ -244,6 +244,8 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
|
|||||||
for (let i: number = 0; i < arr.length; ++i) {
|
for (let i: number = 0; i < arr.length; ++i) {
|
||||||
arr[i] = getRandomInt(0, 24);
|
arr[i] = getRandomInt(0, 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return arr;
|
||||||
},
|
},
|
||||||
name: "Array Jumping Game",
|
name: "Array Jumping Game",
|
||||||
numTries: 1,
|
numTries: 1,
|
||||||
@ -265,7 +267,7 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
|
|||||||
desc: (arr: number[][]) => {
|
desc: (arr: number[][]) => {
|
||||||
return ["Given the following array of array of numbers representing a list of",
|
return ["Given the following array of array of numbers representing a list of",
|
||||||
"intervals, merge all overlapping intervals.\n\n",
|
"intervals, merge all overlapping intervals.\n\n",
|
||||||
`${arr}\n\n`,
|
`[${convert2DArrayToString(arr)}]\n\n`,
|
||||||
"Example:\n\n",
|
"Example:\n\n",
|
||||||
"[[1, 3], [8, 10], [2, 6], [10, 16]]\n\n",
|
"[[1, 3], [8, 10], [2, 6], [10, 16]]\n\n",
|
||||||
"would merge into [[1, 6], [8, 16]].\n\n",
|
"would merge into [[1, 6], [8, 16]].\n\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user