Leetcode Smallest String Concatenation In C