From 329f501d56a20edbc4f6e0e638852fc14867eff4 Mon Sep 17 00:00:00 2001 From: Robert McGovern Date: Mon, 20 Apr 2020 13:40:05 +0100 Subject: [PATCH] New Article --- _posts/2020-04-20-swift-coding-challenges.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 _posts/2020-04-20-swift-coding-challenges.md diff --git a/_posts/2020-04-20-swift-coding-challenges.md b/_posts/2020-04-20-swift-coding-challenges.md new file mode 100644 index 0000000..be9d298 --- /dev/null +++ b/_posts/2020-04-20-swift-coding-challenges.md @@ -0,0 +1,17 @@ +--- +title: 'Swift Coding Challenges: Challenge 1' +tags: +- programming +- ios +- swift +- coding-challenges +category: coding-challenges +date: 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](https://www.hackingwithswift.com/store/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* \ No newline at end of file