4

Kotlin Tutorial: Binary Representation of Numbers. Advent of Code Puzzles

 2 years ago
source link: https://www.youtube.com/watch?v=XEFna3xyxeY
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
#AdventOfCode #Kotlin #AdventOfСodeInKotlin

Kotlin Tutorial: Binary Representation of Numbers. Advent of Code Puzzles

1,625 views
Sep 9, 2021

20.6K subscribers

In the fifth episode of Idiomatic Kotlin’s #AdventOfCode series, 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.

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

Solution → https://github.com/kotlin-hands-on/ad...

* Used with the permission of Advent of Code (Eric Wastl) #Kotlin #AdventOfСodeInKotlin #Idiomatic #Tutorial #AdventOfCode

Show lessShow more


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK