A correct C solution to Clone Graph does not compile
Maintainer antworten meist innerhalb von 1 Tag
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
- 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.
- Vorherrschende Sprache
- Rust
- Sterne
- 177
- Forks
- 100
- Ø Merge
- 1 T. 10 Std.
- Gemergte PRs (30 T.)
- 191
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sysprog21/codetrial
-
Selecting a pen color leaves Example drawing in eraser modeEvtl. vergeben @Aa99841 hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
sysprog21/codetrial#437 · 4 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Python tests lose every result when the solution returns inf or NaNEvtl. vergeben @shensyuan hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
sysprog21/codetrial#419 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Allow deselecting a chosen problem card by clicking it againEvtl. vergeben @woohsin hat das vor 4 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
sysprog21/codetrial#392 · 4 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Audio output can be confirmed without playing a test soundEvtl. vergeben @ChenYingHan1121 hat das vor 6 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
sysprog21/codetrial#359 · 5 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add a Copy code button to the final reportEvtl. vergeben @yansawu hat das vor 7 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
sysprog21/codetrial#318 · 6 Kommentare · 2 Reaktionen · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in sysprog21/codetrial
Ähnliche Issues
-
area/backends bug session-analysis
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 69/100
Maintainer antworten meist innerhalb von 1 Tag
-
docs good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
crash
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
aaif-goose/goose#13125 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 1 Tag