-
Notifications
You must be signed in to change notification settings - Fork 0
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
您好作者,对算法的某处有个疑问 #6
Comments
会,item会变
…---原始邮件---
发件人: ***@***.***>
发送时间: 2024年2月13日(周二) 晚上11:19
收件人: ***@***.***>;
抄送: ***@***.***>;
主题: [pedrogao/pedrogao.github.io] 您好作者,对算法的某处有个疑问 (Issue #6)
位置
let origin = this.findItemById(item.origin); for (let i = destIndex; ; i++) { if (!scanning) { destIndex = i; } if (i === this.content.length) { break; } const o = this.content[i]; // 疑惑: oorigin和origin会出现不同的情况吗?都是this.findItemById(item.origin); const oorigin = this.findItemById(item.origin); // Insert i before o // case1: or < ir < i < o => break // case2: or = ir < min(i, o) < max(i, o) => break if (oorigin < origin || (oorigin === origin && item.id[0] <= o.id[0])) { break; }
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
请问是怎么变化的呢?没有看到任何对item或者item.origin的赋值语句 |
不好意思,我会错你的意思了,item 的内容不会变,但它的 origin及originRight会在merge的时候变,因此每次取origin都需要调用一次函数 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
位置
疑问写在注释内部了,我感觉正确的算法是不是应该是
const oorigin = this.finditemByid(o)?
The text was updated successfully, but these errors were encountered: