filmov
tv
Learn Kotlin with the Kotlin Team: Advent of Code 2020 #5
Показать описание
We continue to learn Kotlin with the Kotlin team! In the fifth episode, we'll look at a “hidden” binary encoding for natural numbers that can be used to identify seats on a plane, along with the Kotlin solution for the challenge. Along the way, we'll discuss the Kotlin standard library functions for working with the binary representation of numbers, the power of local functions, and why ‘max’ disappeared from the standard library but will “reappear” in a new form.
Day 5: Binary boarding
Use the Kotlin standard library functions ('replace', 'toInt', 'find') to work with the binary representation of numbers, explore powerful local functions, and learn how to use the 'max' function in Kotlin 1.5.
0:51 Problem description
3:42 Solving part I: Boarding pass: binary representation
6:30 Decoding column
7:31 Converting boarding pass to seat ID
8:50 Finding the maximum seat ID
9:30 Solving part II: Finding the vacant seat ID
12:43 Wrapping up
* Used with the permission of Advent of Code (Eric Wastl)
#Kotlin #Idiomatic #Tutorial #AdventOfCode #AdventOfCode2020 #AdventOfСodeInKotlin #Day5
Day 5: Binary boarding
Use the Kotlin standard library functions ('replace', 'toInt', 'find') to work with the binary representation of numbers, explore powerful local functions, and learn how to use the 'max' function in Kotlin 1.5.
0:51 Problem description
3:42 Solving part I: Boarding pass: binary representation
6:30 Decoding column
7:31 Converting boarding pass to seat ID
8:50 Finding the maximum seat ID
9:30 Solving part II: Finding the vacant seat ID
12:43 Wrapping up
* Used with the permission of Advent of Code (Eric Wastl)
#Kotlin #Idiomatic #Tutorial #AdventOfCode #AdventOfCode2020 #AdventOfСodeInKotlin #Day5
Комментарии