Skip to content
New issue

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

[Bug] Day07 关于append的错误 #27

Open
ZhengLiu-727 opened this issue May 23, 2022 · 1 comment
Open

[Bug] Day07 关于append的错误 #27

ZhengLiu-727 opened this issue May 23, 2022 · 1 comment

Comments

@ZhengLiu-727
Copy link

在day07最后一部分,1.5 append() 和 copy() 函数中,运行结果是错误的

正确结果如下

len=0 cap=0 slice=[]
len=1 cap=1 slice=[0]
len=2 cap=2 slice=[0 1]
len=6 cap=6 slice=[0 1 2 3 4 5]
len=6 cap=12 slice=[0 1 2 3 4 5]

建议在这里详细讲一下append的扩容

@WangH26
Copy link

WangH26 commented May 23, 2022 via email

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

No branches or pull requests

2 participants