New Article

This commit is contained in:
Robert McGovern 2020-04-20 13:40:05 +01:00
parent 48c323f712
commit 329f501d56
1 changed files with 17 additions and 0 deletions

View File

@ -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*