CaseIterable
protocol do?Suggested approach: Go straight in and answer that this protocol allows us to loop over all cases in an enum, but then follow up with a practical example – you might have a word search generation algorithm that has enum cases for all possible directions you can place a word, so you loop over them all to try and find a valid spot for each word.
Estimated difficulty: Easy
See the full list of iOS interview questions
Link copied to your pasteboard.