DrillLab
Coding 题Coding problems

一道一道写One problem at a time

全站 25 道成型的 coding 题都在这儿。题面、需求、参考答案全部引用原来那一节,不是另抄一份。其中 21 道能直接在浏览器里写完并跑测试。All 25 coding problems, pulled from the lessons rather than copied. 21 of them run in the browser.

0 / 25道打过勾ticked done
只有你自己打勾才会加。不做自动判定 —— 测试绿了不等于你不看答案也能写出来。Only your own tick counts. Green tests do not prove you could write it again from scratch.
先读题,别先看答案Read the problem before the answer

每道题的页面默认只有题面 —— 工作区要点一下才开,讲解和答案在门后面。这个顺序是故意的:先自己卡住一会儿,后面看讲解才有用。Each page shows only the problem by default — the workspace opens on a click, and the walkthrough and answer sit behind gates. That order is deliberate: getting stuck for a while first is what makes the walkthrough worth reading.

沙箱有两档。第一遍用带脚手架学会;第二遍点空白重来,实现文件全清空,只留测试 —— 那一遍才算验收。The sandbox has two modes. Learn it the first time with the scaffold; the second time hit Blank slate — every implementation file is emptied and only the tests remain. That pass is the one that counts.

为什么有的跑不了Why some can't run here

GraphQL subgraph 要真起一个服务,Spring 那道要 JVM 和 Maven —— 浏览器里都办不到。这两道给的是本机命令和期望输出,不给假编辑器。The GraphQL subgraph needs a real server process, and the Spring one needs a JVM and Maven — neither can happen in a browser. Those two hand you local commands and the expected output, not a fake editor.