educative.io

Why is the titles string set provided to the group titles function as an inout parmeter?

the titles string set is never modified so it seems that it would be a better practice to simply pass the string set as a constant rather than enable mutability for the set.


Course: Decode the Coding Interview in Swift: Real-World Examples - Learn Interactively
Lesson: Feature #1: Group Similar Titles - Decode the Coding Interview in Swift: Real-World Examples