April 8, 2020
  • 5:53 pm Joe Biden to address impeachment and Trump-Ukraine whistleblower call , live stream
  • 5:53 pm President Trump’s 2020 State of the Union address and the Democratic response (FULL LIVE STREAM)
  • 5:53 pm Video – Need help? Call Blue Card Services!
  • 5:53 pm Temple University Student’s Viral Tik Tok Video Calling North Philadelphia ‘The Ghetto’ Causes Outra
  • 4:52 pm @TorontoPolice News Conference Re: Homicide #54/2016 Jarryl Hagley, 17 | Fri Oct 21st, 1pm
Array.from and Tree structure in JavaScript. Codingame: Telephone Numbers – Solved


Programming shouldn’t be boring. Let’s play with a Codingame’s puzzle today. [Music playing] Hi! Let’s play and solve a puzzle titled “Telephone
Numbers” by Codingame. I’m Anatol and you are watching the Good Parts
of the FrontEnd development. If this is your first time here, you wanna
learn Frontend and JavaScript, start now by subscribing and don’t forget to turn on
the subtitles. [Music playing] The story tells: Dang, all those telephone
numbers are impossible to remember! What if we were to invent a new way to store
phone numbers so that they take the least memory space? It is your task today to achieve that hard
work. Then call me, maybe? In this puzzle, you learn new ways and reasons
to store data in optimized structures such as Tree. The goal of this puzzle is to store multiple
phone numbers in a compact way, using a tree data structure, then count all the nodes there
are in this tree. I’ve told about Tree Data Structures earlier
in this video, so you can check the link in the description. To create a list of the numbers I use Array.from
method. It creates a new Array instance from an array-like
or iterable object. It has following syntax. Let’s dive into the code. [Music playing] Read a list of number and set the initial
values Build a tree using given list Now calculate the nodes Let’s test it Tests are green. Good job! That’s pretty easy, isn’t it? Next time let’s have a look at “There is no
spoon” puzzle. [Music playing] My code is available on GitHub
Documentation is available in the Internet Follow the links if you’re eager to get
more. [Music playing] If you like this video give it “thumbs up”,
share it with your friends, subscribe to the channel and watch other episodes. Thanks for watching and dive deeper.

Robin Kshlerin

RELATED ARTICLES
LEAVE A COMMENT