Idiomatic Kotlin: Operations with Sets
source link: https://www.youtube.com/watch?v=QLAB0kZ-Tqc
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.
Idiomatic Kotlin: Operations with Sets
Grouping and counting the characters in strings and collections is a very typical task given in coding interviews. Usually, the solutions for such tasks are quite simple. In this blog post, we learn about a few useful functions in Kotlin that make set operations really simple. In this video, Anton is solving the Advent of Code 2020 Day 6 challenge by using Kotlin standard library functions.
0:00 Introduction 0:48 Task description 1:30 Reading the input 2:00 Naive solution 3:00 Use sumOf function 3:22 Part 2 of the challenge 4:00 Naive solution to the 2nd part 6:01 Using reduce function 6:30 Refactoring the solution 8:47 Common solution to both parts 9:30 Outro
Blog post → https://blog.jetbrains.com/kotlin/202... Solution → https://github.com/kotlin-hands-on/ad...
Idiomatic Kotlin: Solving Advent of Code Puzzles Series https://youtube.com/playlist?list=PLl...
* Used with the permission of Advent of Code (Eric Wastl) #Kotlin #AdventOfСodeInKotlin #Idiomatic #Tutorial #AdventOfCode
Show lessShow more
8 Comments
Hello Nice content so far, but I would like to offer a constructive comment for the betterment of this series.
Can you please take more time explaining the problem so that the viewer may be able to know what we are trying to accomplish, instead of partially explaining the sections in the problems and hacking away.
Otherwise, this is a good series
Read more 1 week ago
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK