Solving a sample coding interview problem in Kotlin

preview_player
Показать описание
#Kotlin #Programming #Learning
Mikhail Dvorkin, ICPC World Finals gold medalist, shows how to solve a sample coding interview problem in Kotlin. This algorithmic problem is about finding dictionary words inside a rectangle field with letters.

Рекомендации по теме
Комментарии
Автор

Good job Mikhail, you're hired ;-)

Champenier
Автор

Very high quality video, thank you Mikhail!

jakobkmar
Автор

Hey, great video! Can you please use the presentation mode on the next one, so we can learn all the shortcuts that were used?

javafactory
Автор

Interesting problem and very informative video, good job!

keanugoo
Автор

This is pretty much backwards of how I would have done it. Instead of starting at coordinates and seeing if I can build one of the words from there, I would start with a word and find potential coordinates and see if you can continue building from there. I'm curious which is faster. I think yours is in almost any condition.

CrapE_DM
Автор

Wouldn't the function benefit from the 'tailrec' keyword for the recursive function?

GakisStylianos
Автор

This is crazy! I have a long ways to go haha!

BenAyesu
Автор

You could create a list of possible xy combinations.

Meatchop
Автор

The final code used rectangle[0] instead of rectangle[y] to kick off the recursion and shouldn’t work?

RobertJeppesen
Автор

You try to give the video more brightness it will be great if you do

CuongNguyen-olst
Автор

Great . Thanks for this video .
I really learn a lot from this .

Although I just have one question, whenever I change the Input I got different result .

val rectangleRaw = """
KOTE
LUNE
AFIN
"""
Here I change NULE -> LUNE and only get FUN as output .

is this the usual behaviour of this program ?

naveensingh
Автор

Would be cool to see a solution for the same problem but with a huge dictionary

BelokonRoman
Автор

I would generate all possible words, for the rectangle and cache it. What is of course not clear in the too brief a problem description, is which one is immutable for the purposes of the "problem". Furthermore the "dictionary" is actually a search criteria, and the rectangle is actually the dictionary since it is the possible set of all words based on yet another tersely described rule, "move 90 degrees". All the same, thanks for putting it up it is appreciated. I wonder if by applying a subset (probably the simplest) English natural language rules for word formation, we could limit the vector traversals...again, in the problem description it is not said if the "dictionary" is a set of English dictionary words or not.

kambizshahri