Skip to content

Solutions to Introduction to Algorithms Third Edition 10-2 - mergeable heaps using linked lists

Notifications You must be signed in to change notification settings

almogtavor/mergeable-heap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mergeable heap using linked lists implementation in C

The solution to problem 10-2 from the book "Introduction to Algorithms" by CLRS.

The problem is:

A mergeable heap supports the following operations:
MAKE-HEAP (which creates an empty mergeable heap), INSERT, MINIMUM, EXTRACT-MIN, and UNION.
Show how to implement mergeable heaps using linked lists in each of the following cases.
Try to make each operation as efficient as possible.
Analyze the running time of each operation in terms of the size of the dynamic set(s) being operated on.

Lists are sorted.
Lists are unsorted.
Lists are unsorted, and dynamic sets to be merged are disjoint.```

About

Solutions to Introduction to Algorithms Third Edition 10-2 - mergeable heaps using linked lists

Topics

Resources

Stars

Watchers

Forks