Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8475629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:56:41+00:00 2026-06-10T17:56:41+00:00

I am little confused on the time it takes to insert or remove an

  • 0

I am little confused on the time it takes to insert or remove an element from a skip list.

Lets say there is a skip list with height H and each level contains n/2^i entries.

n = total number of key value pairs
i = level of the skip list i<= H

Now, as per the theory an insertion operation will perform following actions
1. Find a key <= the key being inserted.
2. insert this key
3. randomly create this entry in the levels above the base level.

Lets assume the Skip list is based on a linked list.
Step 1: Should take O(n).
Step 2: Should be O(1).
Step 3: Should be O(log n) time. I am still confused in this logic and it will be part of the question below

Question

  1. Based on the above facts shouldn’t the time of insertion be O(n) + O(1) + O(log n)?
    ignoring the lower order terms its should go by O(n) + O(log n)?

  2. Step 3 again should take O(n) time to search a key <= key being inserted and then o(1) to insert. Resulting in a much complex insertion running time?

Books say that insertion in a skip list takes O(log n) time. I must be missing some important piece of information, could you please help me get a good understanding of this concept.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:56:42+00:00Added an answer on June 10, 2026 at 5:56 pm

    The entire point of the skip list is to not have to run through the whole list to find an item. You search in the upper list first, then you go down one level and so on until you reach the base list.

    Let’s say the top list contains 2 items, the first one and one somewhere in the middle. When you search for your item, the list is already cut in half. Each level will approximately cut the list in half. This is what makes the insert O(log n).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a little confused about the HTTP protocol, from what i know HTTP was
I'm working on my first cocoa app from scratch and I'm a little confused
I am a little confused by the definition of interarrival time, does it mean
Am a little confused about how subversion model works. So say me and my
I'm a little confused at the moment, first time poster here on stack overflow.
I am little confused with the applicability of reinterpret_cast vs static_cast . From what
I am a little confused in my about permissions, in my dev environment I
I am a little confused on how exactly postScale method calculates the values of
I am a little confused about Accept-Encoding . I have Web Service which would
I'm a little confused by the structure of the Node class in OpenJDK's implementation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.