Search in a skip list at O(logk)

  • Thread starter Thread starter Edd257
  • Start date Start date
  • Tags Tags
    List Search
Click For Summary
SUMMARY

The discussion focuses on implementing a search algorithm for finding an element x in a skip list with an expected running time of O(logk), where k represents the position of x in the list. The user is familiar with achieving O(logn) complexity but seeks guidance on optimizing the search to O(logk). The conversation emphasizes the need for a reasonable upper bound on the position of the element that allows for this improved performance, moving beyond the trivial O(logn) approach.

PREREQUISITES
  • Understanding of skip list data structures
  • Familiarity with algorithmic time complexity
  • Knowledge of O(logn) search algorithms
  • Basic programming skills for implementing pseudo code
NEXT STEPS
  • Research the properties and operations of skip lists
  • Learn about expected time complexities in probabilistic data structures
  • Explore techniques for optimizing search algorithms in skip lists
  • Study pseudo code examples for O(logk) search implementations
USEFUL FOR

Software developers, algorithm enthusiasts, and computer science students interested in advanced data structures and search optimization techniques.

Edd257
Messages
5
Reaction score
0
I need to write a code that finds element x in a skip list. I need to implement that in O(logk) expected running time, where k is the location of x at the list (i.e., there are k-1 elements before x in the list).

I know how to do it at o(logn), but not o(logk).

can you show me the way? I need only general description or pseudo code, not more than that.
 
Physics news on Phys.org
Can you find a "reasonable"* upper bound on the position of your element that runs in O(logk)?

*n is a trivial upper bound of course and does not help, the only non-trivial way I see is reasonable.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K