Advant Day 1 solution.
- Problem Statement:-
https://adventofcode.com/2020/day/1
- Solution for Part 1
- Solution for Part 2
Advant Day 2 solution.
- Problem Statement:-
https://adventofcode.com/2020/day/2
- Solution for Part 1
- Solution for Part 2
Advant Day 4 solution by considering design.
- Problem Statement:-
https://adventofcode.com/2020/day/4
- Solution for Part 1
- Solution for Part 2
-
Protocol with default implementation ( Has - A Relationship with struct
Problem1
) -
Retroactive modeling for
-
Collection's API :
a.func getPassportFieldInHashTable() throws -> [PassportField: String] where Self.Element == String
-
String's API:-
a.func getStringComponent(for givenCharacterSet: CharacterSet) -> [String]
b.func getInteger()-> Int?
- Enum
PassportField
for type-safty better than String
enum PassportField: String, CaseIterable { case byr case iyr case eyr case hgt case hcl case ecl case pid case cid case none }
-
API documentation for locally reason about code.
-
Error Handling
Advant Day 5 solution
- Problem Statement:-
https://adventofcode.com/2020/day/5
- Solution for Part 1
- Solution for Part 2
Advant Day 6 solution
- Problem Statement:-
https://adventofcode.com/2020/day/6
- Solution for Part 1
- Solution for Part 2