Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

A correct C solution to Clone Graph does not compile

Geschlossen
#332 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Wu-1127 arbeitet bereits daran.

Seit 17.10.2026.

  • #333 von @Wu-1127 — offen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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.
Vorherrschende Sprache
Rust
Sterne
177
Forks
100
Ø Merge
1 T. 10 Std.
Gemergte PRs (30 T.)
191

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus sysprog21/codetrial

Alle Issues in sysprog21/codetrial

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.