Ring Buffer Dump Lookup accepts searches that miss the last entry
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Observed behavior
The five built-in cases for Ring Buffer Dump Lookup (search-in-rotated-sorted-array) all pass for two incorrect implementations of the sorted-half binary search: one uses an exclusive right bound, and one treats a one-element left half as unsorted.
Expected behavior
A candidate must return the zero-based position of every present target, including the last element of a wrapped dump.
Reproduction
- Run a sorted-half binary search against the five built-in cases.
- Change only
target <= nums[hi]in the sorted-right-half branch totarget < nums[hi]. The built-in cases still pass 5/5, butlocateSequenceNumber([3, 1, 2], 2)returns-1instead of2. - Restore the right bound and change only the sorted-left-half test from
nums[lo] <= nums[mid]tonums[lo] < nums[mid]. The built-in cases still pass 5/5, butlocateSequenceNumber([2, 1], 1)returns-1instead of1.
CodeTrial version
Source at c24068bb67a06536cd6472ce91c1563fb38f472b
Environment
Windows, Node.js v24.22.0. I exercised CodeTrial's JavaScript runner and answer checker with a Node adapter for the Worker API. With both cases appended in memory, the correct search passes 7/7 and both incorrect versions pass 6/7.
Sanitized evidence
Proposed scope
Add these two cases to the judge source, regenerate the browser judge, update the task digest and contract assertions, and add a regression that checks which labeled case rejects each wrong implementation. Could you confirm the scope and assign this issue to me?
The examples are synthetic and contain no credentials or personal interview data.
Public data confirmation
- I removed credentials, session tokens, candidate recordings, and personal interview content from this public report.
- Ngôn ngữ chính
- Rust
- Star
- 236
- Fork
- 153
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 187
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sysprog21/codetrial
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Unify Java harness validation error messagesCó thể đã có người làm @weichieh0204 đã nhận hôm nay. Đang mở
sysprog21/codetrial#872 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Inferred void class operations are never checked against the starter's return typeCó thể đã có người làm @papaya0112 đã nhận hôm nay. Đang mở
sysprog21/codetrial#871 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Edge Thumbnail Store accepts a store that does not refresh a key on overwriteCó thể đã có người làm @BOBOGUAGUA428 đã nhận hôm nay. Đang mở
sysprog21/codetrial#869 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sysprog21/codetrial
Issue tương tự
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
eliasstravik/herdr-projects#1605 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
jlcodes99/cockpit-tools#3332 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Cognito: the email MFA code (EMAIL_OTP challenge after a password flow) has 8 digits; AWS delivers 6Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/aws-emulator#692 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
pamburus/hl#1779 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày