Skip to content

London | 26-JUL-SDC |Ping Wang | Sprint 2 | Skip list CYF-1185 - #234

Open
pathywang wants to merge 2 commits into
CodeYourFuture:mainfrom
pathywang:skip-list
Open

pathywang wants to merge 2 commits into
CodeYourFuture:mainfrom
pathywang:skip-list

Conversation

@pathywang

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1185

Changelist

very hard to complete this coursework with lots of AL help and explanation due to that i can not understand some code so definitely require lots of review as well.

@pathywang pathywang added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 4, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you have implemented the Skip list once. Could you reproduce the code from scratch without consulting AI?

Comment on lines +73 to +74
def __contains__(self, value):
return self.contains(value)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of including this __contains__() method?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for asking.I included contains() to allow the skip list to support Python's in operator, so users can check membership with value in skip_list instead of calling skip_list.contains(value) directly. It delegates to the existing contains() method to avoid duplicating the search logic. Are you happy with it.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 10, 2026
@pathywang

pathywang commented Oct 10, 2026 •

Copy link
Copy Markdown
Author

sorry i can not reproduce the code from scratch on my own at the moment because i have not done enough review while i am suffering from code this week. Hopefully I can do at the end of next week.

@pathywang pathywang added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Oct 10, 2026
@cjyuan

cjyuan commented Oct 10, 2026

Copy link
Copy Markdown

Skip list is is relatively hard to implement.
Suggestion: Try to fully understand how Skip List works before studying its implementation.

For example, this video gives a good illustration of how Skip List works: https://www.youtube.com/watch?v=UGaOXaXAM5M
However, it does not include any pseudo code and it does not fully match the way you implemented your Skip List.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 10, 2026
@pathywang

pathywang commented Oct 10, 2026 •

Copy link
Copy Markdown
Author

Thank you for valuable suggestion, i will do as you directed

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

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants