Added C++ solution to Optimal Partition of String Problem
The approach was taking a hash map to keep track of values and clearing it whenever we saw a duplicate element. Every time the hash map was cleared, we created a partition between two groups! The result + 1 gives us the optimal number of groups this way.
This PR references #20
Added C++ solution to Optimal Partition of String Problem
The approach was taking a hash map to keep track of values and clearing it whenever we saw a duplicate element. Every time the hash map was cleared, we created a partition between two groups! The result + 1 gives us the optimal number of groups this way.
Thank you!