-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Description
Bug Report for https://neetcode.io/problems/majority-element
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
Include the test case [6,5,5] or any one where the first element is one count off from being the majority element. The test cases for submission miss detecting an off by one error when the first element is accidentally counted twice - a common mistake if a programmer accidentally starts their for loop at the beginning but also initialized count to one and the majority element to the first element.

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels