Tap here to switch tabs
Problem
Submissions

Problem: Minimum Cost to Merge Sorted Lists

Minimum Cost to Merge Sorted Lists asks you to repeatedly combine any two sorted arrays, paying the defined cost each time, and return the lowest total cost to create one sorted list.

Statement

You are given an array of 2extD2 ext{D} integers lists, where each inner array lists[i] is sorted in non decreasing order.

In one operation, you can choose any two lists aa and bb, and merge them into a single sorted list. The cost of this operation is defined as:

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Cost to Merge Sorted Lists

Minimum Cost to Merge Sorted Lists asks you to repeatedly combine any two sorted arrays, paying the defined cost each time, and return the lowest total cost to create one sorted list.

Statement

You are given an array of 2extD2 ext{D} integers lists, where each inner array lists[i] is sorted in non decreasing order.

In one operation, you can choose any two lists aa and bb, and merge them into a single sorted list. The cost of this operation is defined as: