A correct C solution to Clone Graph does not compile
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
Observed behavior
The C starter for Clone Graph (shown as Sandbox Topology Replica) documents the node as struct Node { int val; int numNeighbors; struct Node** neighbors; }, matching LeetCode's C template, but the C harness in web/compiler-explorer.js declares that field as neighborsSize. A correct solution that follows the documented struct fails to compile with four no member named 'numNeighbors' errors, so no test case runs. The compiler note now points only at <test harness>, so the name the harness expects is not shown anywhere a candidate can read it.
Expected behavior
A solution written against the struct in the starter comment compiles and is graded. Renaming the field to neighborsSize in the same solution passes all five cases, so only the field name differs.
Reproduction
- Open Sandbox Topology Replica and select C.
- Write a DFS clone that uses the documented field, e.g.
clone->numNeighbors = node->numNeighbors;andfor (int i = 0; i < node->numNeighbors; i++). - Run the tests.
CodeTrial version
codetrial 0.1.0 (34f5617)
Environment
OS: macOS <26.4.1> (arm64)
Browser: chrome <155.0.8059.40 >
Language: C
Interview loop: coding
Problem: Sandbox Topology Replica (Clone Graph)
REACTO or STAR step: Code (running tests)
Reconnect: none
Sanitized evidence
<source>:19:12: error: no member named 'numNeighbors' in 'struct Node'; did you mean 'neighbors'?
19 | clone->numNeighbors = node->numNeighbors;
<test harness>: note: 'neighbors' declared here
<source>:22:31: error: no member named 'numNeighbors' in 'struct Node'; did you mean 'neighbors'?
22 | for (int i = 0; i < node->numNeighbors; i++) {
4 errors generated.
Public data confirmation
- I removed credentials, session tokens, candidate recordings, and personal interview content from this public report.
- 主要语言
- Rust
- 星标
- 160
- 派生
- 64
- 平均合并
- 1 天 12 小时
- 30 天内合并 PR
- 124
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sysprog21/codetrial 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 80/100
sysprog21/codetrial#318 · 3 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
Candidate test cases persist across interviews for the same problem in the same tab可能已有人在做 @MZGamer 于 1 天前认领。 未关闭
sysprog21/codetrial#336 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Run the live interviewer on a local speech pipeline可能已有人在做 @alanhc 于 1 天前认领。 未关闭
sysprog21/codetrial#330 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Let the candidate undo Continue without camera in the preflight可能已有人在做 @HALA1028 于 2 天前认领。 未关闭
sysprog21/codetrial#327 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Allow users to start an interview without GitHub sign-in可能已有人在做 @TMQ0717 于 3 天前认领。 未关闭
sysprog21/codetrial#316 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 sysprog21/codetrial 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
521xueweihan/HelloGitHub#4023 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
nautechsystems/nautilus_trader#5365 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 78/100
IntersectMBO/developer-experience#347 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
registrystack/registry-stack#2168 ·
维护者通常 1 天内回复
-
bug crate: 3d help wanted triage
难度 2/5 1-3 小时 新手友好度 78/100
kornia/kornia-rs#1203 · 1 条评论 ·
维护者通常 1 天内回复