Idiomatic Kotlin: Solving Advent of Code Puzzles, Day 2

1 Просмотры
Let’s continue learning how to write idiomatic Kotlin code by solving the Advent of Code 2020 tasks!*

Today, we’re discussing the solution for the day 2 task.

We are looking at string utility functions, regular expressions, operations on collections, and how the "let" function helps to transform the expression nicely to the form you need.

0:00 Intro
0:35 Day 2 task description
1:10 Policy in Part I
1:45 Policy in Part II
2:29 Reading input
4:12 Parsing input: using utility functions on Strings
6:47 Parsing input: using regular expressions
8:46 Password validation: Part I
9:36 Password validation: Part II
10:31 Conclusion

Please let us know if you find this format useful and would like us to provide solutions for more difficult tasks!

GitHub project →
Blog post →

* Used with the permission of Advent of Code (Eric Wastl)

#Kotlin #AdventOfСodeInKotlin #DAY2 #Idiomatic #Tutorial #AdventOfCode
Язык программирования Kotlin
Комментариев нет.