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時間
- マージ済み PR(30日)
- 124
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sysprog21/codetrial のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
sysprog21/codetrial#318 · コメント 3 件 · リアクション 2 件 ·
メンテナーはふだん 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 が今日担当しました。 オープン
sysprog21/codetrial#330 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Let the candidate undo Continue without camera in the preflight対応中かも @HALA1028 が 1 日前に担当しました。 オープン
sysprog21/codetrial#327 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Allow users to start an interview without GitHub sign-in対応中かも @TMQ0717 が 2 日前に担当しました。 オープン
sysprog21/codetrial#316 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
sysprog21/codetrial の issue をすべて見る
似ている issue
-
area:ecosystem documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Chelis-Lang/chelis#3866 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
metasequoiaime/msime#8620 ·
メンテナーはふだん 1 日以内に返信
-
agent-detection macos p2 triaged
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
bug documentation sev-0
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信