diff --git a/codes/typescript/modules/PrintUtil.ts b/codes/typescript/modules/PrintUtil.ts index 5da0daadcd..2245e12fc9 100644 --- a/codes/typescript/modules/PrintUtil.ts +++ b/codes/typescript/modules/PrintUtil.ts @@ -78,7 +78,7 @@ function showTrunks(p: Trunk | null) { } showTrunks(p.prev); - console.log(p.str); + process.stdout.write(p.str); } /* 打印堆 */