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 小時
- 30 天內合併 PR
- 187
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 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 天內回覆