Ring Buffer Dump Lookup accepts searches that miss the last entry
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 236
- Forks
- 153
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 187
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine 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
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 1 Tag
-
Unify Java harness validation error messagesEvtl. vergeben @weichieh0204 hat das heute übernommen. Offen
sysprog21/codetrial#872 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Inferred void class operations are never checked against the starter's return typeEvtl. vergeben @papaya0112 hat das heute übernommen. Offen
sysprog21/codetrial#871 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Edge Thumbnail Store accepts a store that does not refresh a key on overwriteEvtl. vergeben @BOBOGUAGUA428 hat das heute übernommen. Offen
sysprog21/codetrial#869 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in sysprog21/codetrial
Ähnliche Issues
-
marketing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
eliasstravik/herdr-projects#1605 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
jlcodes99/cockpit-tools#3332 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Cognito: the email MFA code (EMAIL_OTP challenge after a password flow) has 8 digits; AWS delivers 6Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
aws/aws-emulator#692 ·
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
pamburus/hl#1779 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag