Coder Social home page Coder Social logo

swiftchallenge's Introduction

SwiftChallenge

This is a collection of Swift coding exercises meant to be used for training and interviewing. Each challenge is contained in its own Swift package and includes a README with the problem statement and further instructions. There are code skeletons and unit tests in every package that help you to verify your solution.

An Xcode workspace is included for convenience. Since all code is contained in plain dependency-less Swift packages though, everything can be built, run and tested on both macOS and Linux.

Check out the index of challenges below or simply browse the folders in the repository.

Most of all, have fun and let me know about ideas for further challenges to be added. Currently unimplemented ideas are tracked in IDEAS.md.

Challenges by Category

Combinatorics

Concurrency

JSON

Other

Protocols & Subclasses

Strings

Challenges by Difficulty

Easy

Medium

Hard

Contributing

Want to contribute? Great!

Git(?=$|Hub|Lab)

The git setup is a bit unusual in that I'm self-hosting the main repository with mirrors on GitHub and GitLab. You cannot engage on the main repository directly because that would require me to set up a user account for you on my self-hosted instance first. However, you can open issues or pull / merge requests on one of the mirrors and I'll sync things with the main repository. If you're old-school, you can also just send me patches via email. ๐Ÿ˜„

Creating a New Challenge

Create the Package

To create a package for a new challenge, run the scaffolding script, e.g.

./scaffold Strings/WarpSort

Add the Package to the Workspace

Once you have the package, add it to the workspace. Since Xcode tends to mess up groups and paths, this step is best done by manually editing SwiftChallenge.xcworkspace/contents.xcworkspacedata.

Update the Schemes

Add a dedicated shared scheme for building and testing your package. Also add the tests in the All scheme.

Flesh out the Package Contents

Every package should contain a problem statement in its README, at least one documented solution and a battery of unit tests for verification.

Normalise Markdown and Regenerate the Main README

We use pandoc to enforce a consistent markdown format across the project. Run the normalize-markdown script to reformat all READMEs. Afterwards regenerate the main README by running the regenerate-readme script. This will automatically list your new package.

License

SwiftChallenge is licensed under the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

swiftchallenge's People

Contributors

johennes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.