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

Can you give an example of a structure of the Cursor? #394

Closed
snyokang opened this issue Oct 16, 2019 · 4 comments
Closed

Can you give an example of a structure of the Cursor? #394

snyokang opened this issue Oct 16, 2019 · 4 comments

Comments

@snyokang
Copy link

image

Hi.
I didn't get the concept of the cursor.
Can you show how the cursor struct will be where the cursor is placed in the purple line?

Is it okay to represent like below?
Cursor {
depth : 1,
parent : red node,
child : blue node,
index : 1,
length : 2,
}

Thank you.

@jeehoonkang
Copy link
Member

I believe:

  • depth: 2 (1 from root to red, 1 from red to purple)
  • parent: red
  • child: blue
  • index: not deducible from the figure
  • length: 1 (1 from parent=red to purple)

@snyokang
Copy link
Author

image

Can I say the index is 2 in this case?

@jeehoonkang
Copy link
Member

Yes, I think so. It's the internal index used to specify which slot contains the child (=blue).

@snyokang
Copy link
Author

Thanks a lot.

@snyokang snyokang reopened this Oct 16, 2019
@kyeongmincho kyeongmincho transferred this issue from kaist-cp/helpdesk Oct 14, 2021
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