Skip to Content
Advanced Algorithms and Data Structures
book

Advanced Algorithms and Data Structures

by Marcello La Rocca
July 2021
Intermediate to advanced
768 pages
25h 23m
English
Manning Publications
Content preview from Advanced Algorithms and Data Structures

5 Disjoint sets: Sub-linear time processing

This chapter covers

  • Solving the problem of keeping a set partitioned into disjoint sets and merging partitions dynamically
  • Describing an API for a data structure for disjoint sets
  • Providing a simple linear-time solution for all methods
  • Improving the running time by using the right underlying data structure
  • Adding easy-to-implement heuristics to get quasi-constant running time
  • Recognizing use cases where the best solution is needed for performance

In this chapter we are going to introduce a problem that seems quite trivial—so trivial that many developers wouldn’t even consider it worth a performance analysis, so they’d just implement the obvious solution to it. Nevertheless, if the expression “wolf ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

A Common-Sense Guide to Data Structures and Algorithms

A Common-Sense Guide to Data Structures and Algorithms

Jay Wengrow
Data Structures & Algorithms in Python

Data Structures & Algorithms in Python

John Canning, Alan Broder, Robert Lafore

Publisher Resources

ISBN: 9781617295485Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link