HackerRank
HackerRank copied to clipboard
👨🏻💻 Solutions to hackerrank.com challenges in Swift
This repository contains my solutions to challenges from hackerrank.com. Solutions are written entirely in Swift. This markdown file tracks my progress as I complete each challenge.
Contents
Core CS
Algorithms
- [x]
Warmup
- [ ]
Implementation
- [ ]
Strings
- [ ]
Sorting
- [ ]
Search
- [ ]
Graph Theory
- [ ]
Greedy
- [ ]
Dynamic Programming
- [ ]
Constructive Algorithms
- [ ]
Bit Manipulation
- [ ]
Recursion
- [ ]
Game Theory
- [ ]
NP Complete
Data Structures
- [ ]
Arrays
- [ ]
Trees
- [ ]
Balanced Trees
- [ ]
Stacks
- [ ]
Queues
- [ ]
Heap
- [ ]
Disjoint Set
- [ ]
Multiple Choice
- [ ]
Trie
- [ ]
Advanced
Tutorials
30 Days of Code
- [x]
30 Challenges completed
Cracking the Coding Interview
- [x]
Data Structures
- [x]
Algorithms
- [x]
Techniques/Concepts
Usage
There are two ways you can test the solutions found in here.
1. Terminal
The first one is the most obvious one, simply compile and run from terminal using single command
$ xcrun swift challenge-solution.swift
where 'challenge-solution.swift' is any swift source file from this repository. This will be the best way to quickly test the solution with console input.
2. Xcode Playground
The second option is to copy code from the source file and paste it into the Xcode Playground. Nearly all of the solutions that you can find here need some kind of input, so don't be surprised when Playground will give you an error. You will need to remove any call to 'readLine()' and hardcode any desired input.
Note
- If you have encountered any problems with solutions feel free to open new issue❗️
- If this helped you in any way consider leaving a star ⭐️