We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e8e4f5 commit 5c9476eCopy full SHA for 5c9476e
src/minimum_cost_to_connect_sticks.rs
@@ -1,6 +1,16 @@
1
use std::cmp::Reverse;
2
use std::collections::BinaryHeap;
3
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.
14
struct Solution;
15
16
impl Solution {
0 commit comments