tarasis.net/_posts/2020-04-20-swift-coding-cha...

973 B

title tags category date
Swift Coding Challenges: Challenge 1
programming
ios
swift
coding-challenges
coding-challenges 2020-04-20 13:36 +0100

As an effort to improve and challenge myself I got a copy of Paul Hudson's Swift Coding Challenges book and I'm going to work through it and post my thoughts on it and about how I did. I (probably) won't post the answers because that might spoil it for some.

For Challenge 1 I basically had the first answer, however I ... um ... made it more complex than I needed to (I'm going to blame it on doing it at 1am). I ended up using a dictionary to store the character and the count of the occurrences of that character, yet I still dropped out of the function if the dictionary keys contained the current character.

I was over thinking the challenge and for some reason thinking about actually counting the occurrences of letters.

facepalm