When Apple announced Swift way back in 2014, people were rightfully skeptical. Nobody knew if it would catch on, and many questioned the need for yet another programming language to learn. computer science
But then Swift went open source in 2015, and though it didn’t explode overnight, the language has steadily grown. There’s never been a better time to learn! We’ve covered online Swift tutorials as well as mobile Swift tutorials, but where do you go once you have the basics down? computer science computer science computer science
Once you’re comfortable with the language, consider testing your skills with these Swift coding challenges. Not only are they fun and stimulating, but they’ll give you the confidence you need in your own abilities. computer science
Codewars is the best place for practicing coding challenges of any kind, including Swift. The entire system is gamified, meaning you gain experience and level up with every successful challenge. It uses a similar ranking system as Go: you start at 8 Kyu and advance all the way to 1 Kyu.
Challenges (called “kata”) are categorized by their difficulty. Fortunately, there are thousands of challenges available, so even if you level up too quickly, you can always go back and work on the easier ones. Challenge types include algorithms, data types, string and number manipulation, control flow, puzzles, logic, and more.
What I love about Codewars is two-fold: first, finishing a kata lets you see the solutions submitted by other users, and second, users can create their own katas so the collection of challenges grows daily. It’s truly one of the best coding games for sharpening your skills.
The Swift coding challenges on CodinGame are more involved than the ones on Codewars, and that’s because CodinGame’s challenges are designed as games. For example, the “Power of Thor” challenge has you moving the position of Thor so that he can reach the Light of Power in as few steps as possible.
Challenges are categorized by difficulty, ranging from Easy to Medium to Hard to Very Hard. There are also community-made puzzles that you can try when you run out of the official ones. Beware that CodinGame’s challenges are pretty tough, but you’ll learn a lot in the struggle. computer science computer science
In addition to solo challenges, CodinGame also offers five-minute multiplayer coding battles (where you try to complete as many challenges as possible) and larger community-wide contests (which occur every month or two).