We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if (index<0 || index>=count) return false;
刚开始插入元素的时候, index >= count 就会出问题,因为 count 初始化为 0,所以即使从头开始插入(即 index = 0),也插入不成功。换句话说根本插入不了元素,我觉得应该改成将 index >= count 改成 index > count:
if (index<0 || index > count) return false;
不知道理解对不对。
The text was updated successfully, but these errors were encountered:
是的,我一开始也是这样子,因为初始化时候元素为0,后来去掉了“=”就ok了
Sorry, something went wrong.
No branches or pull requests
if (index<0 || index>=count) return false;
刚开始插入元素的时候, index >= count 就会出问题,因为 count 初始化为 0,所以即使从头开始插入(即 index = 0),也插入不成功。换句话说根本插入不了元素,我觉得应该改成将 index >= count 改成 index > count:
if (index<0 || index > count) return false;
不知道理解对不对。
The text was updated successfully, but these errors were encountered: