Firmware Buffer Splice judge misses valid zeros in nums1
メンテナーはふだん 1 日以内に返信
評価
この issue はまだ評価されていません。
説明
Observed behavior
In Firmware Buffer Splice, a Python solution that removes every zero from nums1 passes all five built-in tests.
With the same code, the custom case [[0, 2, 0], 2, [1], 1] fails. The result is [1, 2], but the expected result is [0, 1, 2].
Expected behavior
The built-in tests should reject solutions that discard a zero within the first m elements of nums1.
I’ll add this case to the built-in judge and verify that a correct in-place merge passes and the zero-dropping solution fails. Could you assign this issue to me?
Reproduction
-
Open Firmware Buffer Splice in Python 3 and paste this code:
class Solution: def spliceReadings(self, nums1: list[int], m: int, nums2: list[int], n: int) -> None: nums1[:] = sorted([x for x in nums1 if x != 0] + nums2[:n]) -
Click Run tests. All five built-in tests pass.
-
Open Add a case, enter
[[0, 2, 0], 2, [1], 1]as Input JSON and[0, 1, 2]as Expected JSON, then click Add case. -
Click Run tests again. The built-in tests still show 5/5, but the custom case fails with
[1, 2].
CodeTrial version
codetrial 0.1.0 (21c45b1)
Environment
OS: Windows
Browser: Chrome
Language: Python 3
Problem: Firmware Buffer Splice
REACTO step: Test
Sanitized evidence
Public data confirmation
- I removed credentials, session tokens, candidate recordings, and personal interview content from this public report.
- 主要言語
- Rust
- スター
- 236
- フォーク
- 153
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 187
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sysprog21/codetrial のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
Unify Java harness validation error messages対応中かも @weichieh0204 が今日担当しました。 オープン
sysprog21/codetrial#872 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Inferred void class operations are never checked against the starter's return type対応中かも @papaya0112 が今日担当しました。 オープン
sysprog21/codetrial#871 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Edge Thumbnail Store accepts a store that does not refresh a key on overwrite対応中かも @BOBOGUAGUA428 が今日担当しました。 オープン
sysprog21/codetrial#869 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
sysprog21/codetrial の issue をすべて見る
似ている issue
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
eliasstravik/herdr-projects#1605 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
jlcodes99/cockpit-tools#3332 ·
メンテナーはふだん 3 日以内に返信
-
Cognito: the email MFA code (EMAIL_OTP challenge after a password flow) has 8 digits; AWS delivers 6オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/aws-emulator#692 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信