Skip to content

Commit 5c9476e

Browse files
committed
Added Missing Description for Minimum Cost to Connect Sticks
1 parent 7e8e4f5 commit 5c9476e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/minimum_cost_to_connect_sticks.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
use std::cmp::Reverse;
22
use std::collections::BinaryHeap;
33

4+
/// You have some number of sticks with positive integer lengths. These lengths
5+
/// are given as an array `sticks`, where `sticks[i]` is the length of the
6+
/// `ith` stick.
7+
///
8+
/// You can connect any two sticks of lengths `x` and `y` into one stick by
9+
/// paying a cost of `x + y`. You must connect all the sticks until there is
10+
/// only one stick remaining.
11+
///
12+
/// Return the minimum cost of connecting all the given sticks into one stick
13+
/// in this way.
414
struct Solution;
515

616
impl Solution {

0 commit comments

Comments
 (0)