Determines problem ID from path or direct ID. If path is provided, reads problem ID from Config.json. If numeric string, returns as problem ID.
Problem ID or path to directory
Problem ID
If Config.json doesn't exist or doesn't contain problem ID
const id = getProblemId('123456'); // Returns: 123456const id = getProblemId('./my-problem'); // Reads from Config.jsonconst id = getProblemId('.'); // Reads from current directory's Config.json Copy
const id = getProblemId('123456'); // Returns: 123456const id = getProblemId('./my-problem'); // Reads from Config.jsonconst id = getProblemId('.'); // Reads from current directory's Config.json
Determines problem ID from path or direct ID. If path is provided, reads problem ID from Config.json. If numeric string, returns as problem ID.