Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

A correct C solution to Clone Graph does not compile

オープン
#332 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Wu-1127 がすでに取り組んでいます。

2026年10月17日 から。

  • #333 @Wu-1127 による — オープン

評価

この 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
  1. Open Sandbox Topology Replica and select C.
  2. Write a DFS clone that uses the documented field, e.g. clone->numNeighbors = node->numNeighbors; and for (int i = 0; i < node->numNeighbors; i++).
  3. 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sysprog21/codetrial のほかの issue

sysprog21/codetrial の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。