Skip to content

Conversation

@kaizhong2021
Copy link

Description

This PR addresses a logical inconsistency in the unfix method of the Bitset class. Previously, the method did not correctly handle the removal of elements in the reversed state (reverse == true). In the reversed state, a bit value of 0 is supposed to represent the existence of an element, whereas 1 represents its absence. However, the existing implementation was incorrectly updating the zeros and ones counters upon removal of an element.

@algorithmzuo
Copy link
Owner

你看都没看懂,你改完之后你都不测吗?你看看报不报错?!无语

@algorithmzuo
Copy link
Owner

https://leetcode.cn/problems/design-bitset/,这是测试链接,我求求你了,去测一下吧!

@kaizhong2021
Copy link
Author

嗯嗯 谢谢左老师 我就是这块没想明白 然后又找gpt4求证了一下 它好像也没回答明白 我应该自己再测一下的😭
谢谢左老师的解答~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants