Skip to content

London | 26-SDC-Mar | Ebrahim Beiati-Asl | Sprint 2 | implement_skip_list#155

Open
ebrahimbeiati wants to merge 1 commit into
CodeYourFuture:mainfrom
ebrahimbeiati:skip_list_pr
Open

London | 26-SDC-Mar | Ebrahim Beiati-Asl | Sprint 2 | implement_skip_list#155
ebrahimbeiati wants to merge 1 commit into
CodeYourFuture:mainfrom
ebrahimbeiati:skip_list_pr

Conversation

@ebrahimbeiati
Copy link
Copy Markdown

Learners, PR Template

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

@ebrahimbeiati ebrahimbeiati added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 16, 2026
Copy link
Copy Markdown

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

What you implemented is not quite a typical SkipList. In particular, your insertion operation is O(n) whereas the insertion cost of a SkipList is O(log n).

A SkipList should be linked list-liked data structure.


if pos < len(self.data) and self.data[pos] == value:
return # value already exists, do not insert duplicates
self.data.insert(pos, 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.

This insertion operation is O(n), which does not meet the requirement.

@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 May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants