Coding Challenge #35.1: Traveling Salesperson

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024

ความคิดเห็น • 339

  • @neomage2021
    @neomage2021 7 ปีที่แล้ว +355

    As a software engineer I enjoy watching these videos. I find them relaxing. You are really good at teaching. Keep up the good work!

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว +48

      That's so nice to hear thank you!

    • @insidioso4304
      @insidioso4304 7 ปีที่แล้ว +21

      Derick Hess Me too! Actually it is relaxing but at the same time it makes you feel the need to code!
      I would call this new way of relaxing: "prograxing"

    • @ericowens9050
      @ericowens9050 6 ปีที่แล้ว +1

      Derick Hess Same here. Makes me feel better to not be alone in that feeling. :-)

    • @Pradeep.Poonia
      @Pradeep.Poonia 5 ปีที่แล้ว

      @@TheCodingTrain Does Derick look like the guy who wrote this paper : th-cam.com/video/goUlyp4rwiU/w-d-xo.html @DerickHess

    • @amandixit3555
      @amandixit3555 3 ปีที่แล้ว

      @@TheCodingTrain choo choo , abey bada ho ja bhai. choo choo

  • @clementbuchanan587
    @clementbuchanan587 3 ปีที่แล้ว +3

    Seriously Dan, I luv, luv, luuuv the way you teach. I am a software developer in training and you make it so much more palatable to digest. I truly hope you continue this great work you're doing man. You're my go to resource when I need ANYTHING for coding.

  • @kevnar
    @kevnar 3 ปีที่แล้ว +4

    I took the formula for line intersection from your Ray Casting video and I just made the TSP algorithm swap the tails of two random intersecting lines in the path. Then I gave it 999 points, and it unscrambled the path in a matter of ten minutes or so. It's not the shortest path, but the amount of progress for that many points is amazing.

  • @DodaGarcia
    @DodaGarcia ปีที่แล้ว +1

    1:10: "Oh a Pokémon Go analogy, this will be easy to follow!"
    1:15: "N-dimensional? I'm lost"

  • @golfball_diver
    @golfball_diver 5 ปีที่แล้ว +59

    i know this is late, but i think the travelling salesman problem requires you to go back to your starting location after visiting every city.

    • @alirizvi710
      @alirizvi710 2 ปีที่แล้ว +1

      yeah otherwise its just a minimum spanning tree problem

    • @themanwiththeplan8404
      @themanwiththeplan8404 2 ปีที่แล้ว +1

      isn't that a hamilton cycle?

    • @VizGhar
      @VizGhar 2 ปีที่แล้ว +4

      TSP is shortest hamiltonian cycle yes

  • @TheDogn
    @TheDogn 7 ปีที่แล้ว +20

    7:13 The bell was a hilariously unexpected touch.

  • @bikachu_
    @bikachu_ 3 ปีที่แล้ว +5

    you're a great teacher and thanks for being so enthusiastic about programming, it really keeps me going!

  • @kevnar
    @kevnar 6 ปีที่แล้ว +130

    Sally has 12 boyfriends. In order to keep them from finding out about each other, she insists on having her visits at the guy's houses. What route does she visit them in that saves her the most travel time so she can maximize the time she spends with each guy?

    • @MrCmon113
      @MrCmon113 6 ปีที่แล้ว +23

      Damn, Sally is even worse than Chuck, who's always trying to spy on Alice and Bob.

    • @Violet-tb8xo
      @Violet-tb8xo 5 ปีที่แล้ว +3

      @@MrCmon113 eve?

    • @kyokarson8233
      @kyokarson8233 5 ปีที่แล้ว +1

      @@MrCmon113 we used to have Darth spying on alice and bob when the love birds wanted to talked :p

    • @arumifitria5433
      @arumifitria5433 5 ปีที่แล้ว +1

      Thanks u inspired me a lot

    • @kavinbharathi
      @kavinbharathi 4 ปีที่แล้ว +2

      _why? Just why?_

  • @Lehiannel
    @Lehiannel 7 ปีที่แล้ว

    Perfect! I am studying it for a project in my R coding class. Your logic explanation was clear, didatic and easy to understand. I enjoyed it :) Keep making videos like that!

  • @ronraisch510
    @ronraisch510 7 ปีที่แล้ว +40

    I yelled "SUM!!!" at the screen for like 4 min lol

  • @seanhudson8453
    @seanhudson8453 5 ปีที่แล้ว +5

    Came here for my uni course. Stayed for the flamboyancy

  • @manurok1901
    @manurok1901 8 ปีที่แล้ว +1

    Love these videos! Been binge watching while I'm off work the past couple of days :p Keep it up man, you're inspiring

  • @nraynaud
    @nraynaud 4 ปีที่แล้ว +4

    I used a traveling salesman in a CNC application, when milling a bunch of pockets, to choose the order of the pockets.

  • @nataliekidd2135
    @nataliekidd2135 7 ปีที่แล้ว

    I really love these videos, they are super informative. I'm a Sophomore in college earning my degree in Computer Science. Even though I haven't learned Java or JavaScript, I really appreciate these videos.

  • @jhokeypokey
    @jhokeypokey 5 ปีที่แล้ว +76

    I come from the future to let you know that this is still interesting.

    • @pretzels3273
      @pretzels3273 5 ปีที่แล้ว +2

      Jared Fairchild and Pokémon go is relevant again

    • @Seedx
      @Seedx 4 ปีที่แล้ว +1

      Welp it’s 2020

    • @t__v_____290
      @t__v_____290 4 ปีที่แล้ว

      Not anymore buddy

    • @bechirjamousi6696
      @bechirjamousi6696 4 ปีที่แล้ว

      TSP needs to get back to its initial position and in this case, it is not
      , am i right?

    • @jetison333
      @jetison333 3 ปีที่แล้ว

      Further in the future here, can confirm its still interesting

  • @tiffsea8876
    @tiffsea8876 4 ปีที่แล้ว +1

    I love that you chose to use 'salesperson' as opposed to traditional 'salesman' term - obviously not all sales persons are 'men'. Thank you for thinking at that level! Makes a huge difference for mental processing!

  • @mihaitmf
    @mihaitmf 5 ปีที่แล้ว +2

    Man, that's awesome! So simple, yet so neat.

  • @sherhy3689
    @sherhy3689 7 ปีที่แล้ว +2

    patient, adequately funny, and informative, please continue this as long as you can --tokyo

  • @Hyuts
    @Hyuts 5 ปีที่แล้ว +1

    I finally downloaded processing! Very cool and easy to install plus allows me to follow along and use all github projects. Thanks!

  • @nowar9220
    @nowar9220 7 ปีที่แล้ว

    first channel ive ever subscribed to!! Really worth it :) Thanks! Apreciate it!!

  • @omshrisn2909
    @omshrisn2909 7 ปีที่แล้ว +3

    I like your approach of programming!!! , understood more clearly than what teachers teach in my college thanks 😃

  • @sina-qh8wm
    @sina-qh8wm 3 ปีที่แล้ว +1

    I created a presentation in university based on this video, thanks a lot :)

  • @per1sher
    @per1sher 8 ปีที่แล้ว +1

    Fascinating video - always enjoy your channel - your enthusiasm is infectious :)

  • @heavencanceller1863
    @heavencanceller1863 3 ปีที่แล้ว

    These videos are both priceless information and entertainment

  • @Ensii
    @Ensii 7 ปีที่แล้ว +1

    Your enthusiasm is priceless :) nice video

  • @sairamankilambi5007
    @sairamankilambi5007 3 ปีที่แล้ว

    2020 it is! Travelling back in time to understand Travelling Sales Person problem...

  • @anonymousvevo8697
    @anonymousvevo8697 4 ปีที่แล้ว +1

    i come from 2020 and your video is still awsome

  • @LorenzoLeonardini
    @LorenzoLeonardini 8 ปีที่แล้ว +15

    "What are the things in your world that you need to find the path way through?" everything in my room I guess

  • @amateuraaron6972
    @amateuraaron6972 2 ปีที่แล้ว

    Hey Dan!
    Just wanted to say
    its 2022
    about 6 years later
    Pokemon Go is still relevant enough for this video hahaha

  • @rafageist
    @rafageist ปีที่แล้ว

    If you don't have the restriction of returning to the starting city, then you have leftover combinations. A B C would be the same as C B A, and so on.

  • @cesarrios3449
    @cesarrios3449 7 ปีที่แล้ว +2

    Where are u programming this? Are you using an text editor or something else? I would appreciate so much if u can answer me. Excelent video, greetings from Mexico :)

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว +3

      Try some of these workflow videos! (let me know if they are helpful)
      sublime text: th-cam.com/video/UCHzlUiDD10/w-d-xo.html
      atom editor: th-cam.com/video/d3OcFexe9Ik/w-d-xo.html
      brackets: th-cam.com/video/nmZbhManVcY/w-d-xo.html
      codepen: th-cam.com/video/5gfUgNpS6kY/w-d-xo.html

  • @michaellazar9078
    @michaellazar9078 6 ปีที่แล้ว +1

    does the salesman have to end up at home after hitting each point once or does he travel from job to job forever? #2 if you had a short repeatable solution. how would a person responsibly disseminate their findings?

  • @nickgooch6928
    @nickgooch6928 7 ปีที่แล้ว +14

    You should use something like this to solve the Maze Generator you made ; )

  • @sujals7108
    @sujals7108 5 ปีที่แล้ว +1

    instead of writing 'bestEver = cities.slice();', you can just write 'bestEver = cities;'. It copies the array exactly

    • @rankail
      @rankail 5 ปีที่แล้ว

      He did it that way first and then "corrected" it. XD

  • @luiginotcool
    @luiginotcool 3 ปีที่แล้ว

    Hey I’m from the future and this is actually really useful for solving shwolobatata-hmm problems

  • @josbex1684
    @josbex1684 7 ปีที่แล้ว

    Interesante gracias... aplicare ahora la heuristica anneling para calcular mas rápido la ruta mas corta

  • @Nerdthagoras
    @Nerdthagoras 7 ปีที่แล้ว

    I plan to use this to find the optimal route while shopping for various items at Walmart!

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว

      Haha, look forward to hearing how that goes!

  • @omaryahia
    @omaryahia 3 ปีที่แล้ว

    your videos are amazing, thank you Daniel

  • @aryamankejriwal5959
    @aryamankejriwal5959 7 ปีที่แล้ว +3

    For the latest thing, the points would be shops where the Nintendo switch is possibly present...

  • @Thijs-Kuiken
    @Thijs-Kuiken 5 ปีที่แล้ว +2

    What this video needs is.... more talking with the arms and hands.
    ;-)
    interesting stuff! though a lot flies over my head. You're an enthusiastic teacher.. fun watch.

  • @amit_awadhi
    @amit_awadhi 3 ปีที่แล้ว

    It should be renamed to "Catching-Pokemon-Problem"😂👌

  • @maxkolbl1527
    @maxkolbl1527 7 ปีที่แล้ว +1

    Pokemon Go was actually the real reason I got interested in this problem... ^^'

  • @ErikHarloff
    @ErikHarloff 8 ปีที่แล้ว +6

    You spoke about providing the Processing code to this example as well. Unfortunately, I didn't find is on github (github.com/CodingRainbow/Rainbow-Code/tree/master/challenges/CC_35_TSP/CC_35.1_TSP). Would you be so nice to provide the Processing code for TSP? Awesome!

  • @Mosch822
    @Mosch822 7 ปีที่แล้ว

    Great Video. Wanna see more

  • @memporium240
    @memporium240 3 ปีที่แล้ว

    You can actually reach an upper bound of n^2*2^n which is a better bound than n factorial.

  • @joonsungkim1218
    @joonsungkim1218 7 ปีที่แล้ว +13

    don't you need to return to the starting point?

    • @kevnar
      @kevnar 4 ปีที่แล้ว +4

      No. The salesman left his wife and family and never plans to go back.

    • @Caleb-zj9xi
      @Caleb-zj9xi 4 ปีที่แล้ว

      That’s called something else.

    • @Matt-yp7io
      @Matt-yp7io 4 ปีที่แล้ว +1

      @@Caleb-zj9xi no its not

  • @kevnar
    @kevnar 2 ปีที่แล้ว

    Scwalla Vatatan! The next new thing!
    I'm going to create it, just to prove Shiffman right!

  • @satishkpradhan
    @satishkpradhan 2 ปีที่แล้ว

    I work with TSP problems with capacity, multiple time windows, service times and profit. The problem escalates so much faster but with some smart meta heuristics, you can get a nice solution really quick. If someone wants the state-of-the-art method message me...
    My current best is 100 nodes optimality for simpler problems with 1 vehicle .... Generally improving and check of a route of 20-30 points with time, capacity and profit take less than a millisecond.... so you can try 1000's improvements each second.

  • @ruyuehong2392
    @ruyuehong2392 6 ปีที่แล้ว +1

    The dynamic network graph is amazing. I wonder how to create those dynamic animation. Is it a special drawing software or particular packages of some languages?

    • @DodaGarcia
      @DodaGarcia ปีที่แล้ว

      I know this is 4 years ago, but just in case you didn't find it, this is p5js! It's a free JavaScript library that makes it easy to create these drawings, and it also has an in-browser editor you can use to get started. It's a fantastic tool and this channel has lots of tutorials for it.

  • @Teth47
    @Teth47 7 ปีที่แล้ว +11

    So it turns out Windows 10's calculator can handle some pretty big numbers, 3000! is ~4.19^9130. Not bad.

    • @lumschente
      @lumschente 5 ปีที่แล้ว

      My Android calculators max is 13547! = 1.085^50089

    • @Tuberex
      @Tuberex 4 ปีที่แล้ว

      4,1493596034378540855568670930866 with 9130 zeros

    • @Tuberex
      @Tuberex 4 ปีที่แล้ว

      @@lumschente the biggest on windows 10 is 3248

  • @pqazx1
    @pqazx1 3 ปีที่แล้ว +1

    how to take input from user for the dist bw points ??and then do this??

  • @MikaelWallgren
    @MikaelWallgren 6 ปีที่แล้ว +1

    About 3:00, shouldn't it be n!/2? ABC and CBA is the same path but reversed? I like your videos, keep up the good work!

    • @BradHouser
      @BradHouser 3 ปีที่แล้ว +1

      And so are ACB, BAC, BCA, and CAB. WIth three cities all paths are the same! You must return to the starting city.)

  • @deathvall3y
    @deathvall3y 5 ปีที่แล้ว

    Energetic.... and lots of love for you

  • @jschoete3430
    @jschoete3430 7 ปีที่แล้ว

    Hi ! Can I ask what studies you did, and what kind of work you do? I'm myself studying IT, and I love these videos and I would like to code like this all day long.
    also if it's not too much to ask, how much do you make with your job? I know it's a bit of a taboo question, so feel free to ignore ^^

  • @toshb1384
    @toshb1384 7 ปีที่แล้ว +95

    "in the future, *some many years from now*, people will be complaining about how pokemon go is irrelevant."
    LOL, pokemon go has become irrelevant literally after a few weeks

    • @mintyplays4682
      @mintyplays4682 7 ปีที่แล้ว +2

      Not anymore! It used a Max Revive and brought generation 2 out! :D

    • @ryuuji159
      @ryuuji159 7 ปีที่แล้ว +7

      and... stil irrelevant

    • @arddison3894
      @arddison3894 6 ปีที่แล้ว +1

      and... now i actually had forgotten it ever existed.

    • @KnakuanaRka
      @KnakuanaRka 5 ปีที่แล้ว +1

      I think it took a few months, but yeah, it blew over pretty fast.

    • @nufik8097
      @nufik8097 3 ปีที่แล้ว

      It's gone

  • @eldiagrama
    @eldiagrama 7 ปีที่แล้ว

    I can´t get the first part to work. I´m new to this. When I write cities.length it appears all red. I have the code exactly as in the video but it does not work :/
    var cities = [];
    var totalCities = 5;
    function setup() {
    createCanvas(400, 300);
    for (var i = 0; i < totalCities; i++) {
    var v = createVector(random(width), random(height));
    cities[i] = v;
    }
    function draw() {
    background(0);
    fill(255);
    for (var i = 0; i < cities.length; i++) {
    ellipse(cities[i].x, cities[i].y, 8, 8);
    }
    }

  • @exorcistgg9833
    @exorcistgg9833 5 ปีที่แล้ว

    lol I was trying to design a program that calculate the shortest distance to go to all pokestop😂 And then I found your vid

  • @bhavyabhatia2337
    @bhavyabhatia2337 7 ปีที่แล้ว +1

    Is there a video for this solution using DP, not brute force ?

  • @aryamankejriwal5959
    @aryamankejriwal5959 7 ปีที่แล้ว +4

    22:21 The bell makes a sound, or you might understand it better as follows:
    class Bell{
    static void makeSound(){
    System.out.println("Ding");
    }
    }

  • @sudhamahajan2272
    @sudhamahajan2272 3 ปีที่แล้ว +1

    How to stop this prog after iterations are completed..?

  • @tythedev9582
    @tythedev9582 3 ปีที่แล้ว

    I am a simple man. I see your videos in my recommendations. I watch. LMBO @16:11 "shmoley-patat-in"?

  • @cvryn7
    @cvryn7 7 ปีที่แล้ว

    Here is my implementation for this complete series: travellingsaleman.herokuapp.com/
    Source Code : github.com/cvryn7/TravellingSalesman

  • @RetroGamingClashOfClans
    @RetroGamingClashOfClans 6 ปีที่แล้ว

    traveling salesman problem is one of the hardest problem in math having no exact method/equation for finding the EXACT shortest route and its is one of the NP problems.... if you can find a quick way to solve this problem for any number of points, it will proof that P = NP and that will get you million dollars as it is one of the 1million$ millennium problem

  • @rodneyjohnson9476
    @rodneyjohnson9476 ปีที่แล้ว

    I want to use this algorithm but where can I find the listing that explains the Java functions in basic command set

  • @stephfong4577
    @stephfong4577 7 ปีที่แล้ว +1

    Wow, I hope I knew about your channel earlier!

  • @DBear8008
    @DBear8008 3 ปีที่แล้ว

    Watching in 2021, PokemonGo is not quite irrelevant but in the back of many peoples minds

  • @Gegellibu
    @Gegellibu 8 ปีที่แล้ว

    For the different path calculations the formula is actually n!/2 as ABC is the same path as CBA

    • @vernonalbayeros4719
      @vernonalbayeros4719 7 ปีที่แล้ว +2

      Still, since when talking about time and space complexities we are referring to very large N counts, the problem's upper bound is still called n! or factorial, since any constant (in your comment's case = (1/2) * n! ) multiplying the n is "irrelevant"

  • @Invenitive
    @Invenitive 6 ปีที่แล้ว

    Why did you do linear paths instead of round trips? All of the examples I've seen of the TSP use round trips

  • @makarandlahane3904
    @makarandlahane3904 7 ปีที่แล้ว

    as you said we want the total sum of all distances,then why haven't you returned the sum from calcDistance function?

  • @irfankarmali4849
    @irfankarmali4849 2 ปีที่แล้ว

    Wouldn't using a algorithm be better than using a randomizer or trying every possibilty. Like maybe the Greedy Algorithm or the Bellman-Ford Algorithm.

  • @gunot5656
    @gunot5656 7 ปีที่แล้ว

    this guy is incredibly entertaining, lol

  • @sensei0101
    @sensei0101 7 ปีที่แล้ว

    Isn't it a good idea to cache parts of the system? So when it hits again, it is just to look it up instead of calculating everything all the time?

  • @geoffwagner4935
    @geoffwagner4935 ปีที่แล้ว +1

    Just bought Pokemon violet xD someone gave us a switch, me still definitely the Battlefield series, Fallout 76, still Payday 2. Battlefield 1 may be my favorite , it' still a tough competitor with 4, 3 still great lots to do, loTS Fallout 76 and BF1, really much more Shiffman tho at the moment xD i don't ignore my gaming profiles,those scores are also precious to maintain. when i'm 90 i'll just be a bigger "troll" i wont even have to say anything, just my profile as a 90 yer old will be a troll of it's own when i'm in a server, Servers are always maxed out so , still must be a thing xD xD xD when i may a gaming community again, Shiffman will ensure, it's be a pretty nice website for gamers xD

  • @unchaynd7266
    @unchaynd7266 ปีที่แล้ว

    5:29 I am here because I'm trying to make a program that can come up with the optimal arrangement for a bunch of chunks of music to form a song, such that the arrangement follows some given rules (e.g., what chunks are allowed to follow what other chunks, minimal repetition of chunks)

  • @jeremysmothers4260
    @jeremysmothers4260 6 ปีที่แล้ว

    Favorite part: 22:52. "Shruntinpatatadahmmm.... *DING"

  • @kaal_bhairav_23
    @kaal_bhairav_23 4 ปีที่แล้ว

    The time complexity can be reduces from n! to (n-1)! since we can fix a point and permute the remaining (n-1) points.

    • @BradHouser
      @BradHouser 3 ปีที่แล้ว

      And assuming the distance from A to B equals the distance from B to A, you can divide (n-1)! by 2.

  • @izoumashka
    @izoumashka 7 ปีที่แล้ว

    well you can narrow down possible paths by just working out which are "edge" vertices and starting from them.

  • @joesmith2715
    @joesmith2715 7 ปีที่แล้ว

    why does he do some challenges in p5 and others in processing? Is it just because one is better for certain things than the other, if so what's better for what?

  • @xTwisteDx
    @xTwisteDx 2 ปีที่แล้ว

    I'm here in 2022, watching this, and Pokemon Go is still relevant.

  • @zyzo99
    @zyzo99 6 ปีที่แล้ว

    One thing i dont get is why the upper boundary in the loops use to be < and not

  • @chopper3lw
    @chopper3lw 5 ปีที่แล้ว

    TSP is the minimum CIRCUITAL path through the points IT IS NOT the minimum path through the set. It's only the CIRCUITAL part that makes it NP-HARD. There's non NP solutions to minimum path.

  • @wardiofficial6945
    @wardiofficial6945 7 ปีที่แล้ว

    could you please make a video to code a system that use GA for navigating the customer of supermarket when they are doing their grocery shopping task. The system should use the shelf's coordinate and the result will display a list of shelf label of the selected shelf from the distance calculated from the supermarket front door. tq

  • @MuhammadAfzal-tk9xl
    @MuhammadAfzal-tk9xl 3 ปีที่แล้ว

    You explain very well
    But i have a question on another day i was watching your A* search algorithm video
    whats the difference between this concept and that A* search ?
    Secondly can i make code of this in c++?
    Please do reply

    • @satishkpradhan
      @satishkpradhan 2 ปีที่แล้ว

      A* is for calculating the shortest distance between a node pair... but for tsp, it is tour that starts and end at the same node. That makes the problem hard and can't be solved by exact methods.

  • @sudhamahajan2272
    @sudhamahajan2272 4 ปีที่แล้ว +1

    how do u make that animation part??what do u use??

  • @tubememax
    @tubememax 3 ปีที่แล้ว

    Sorry, I'm new here. Is it possible to open his completed java travelling salesperson project to try something out?

  • @arhabersham
    @arhabersham 6 ปีที่แล้ว

    Help! At 10:05 , I don't see index (element?) [3]... I only see [0] to [2] . Did I miss something?

  • @VictorNascimentoo
    @VictorNascimentoo 5 ปีที่แล้ว +1

    The annoying day Pokémon Go mentions are supposed to kick in is today.

  • @gadeichhorn
    @gadeichhorn 5 ปีที่แล้ว

    great stuff! would like to see ant colony simulation for the same problem or event multiple sales doing each multiple visits.

  • @Habbxor
    @Habbxor 7 ปีที่แล้ว +1

    Would Prim's algorithm work better? I searched up and this is an O(V^2), and Prim's is O(|E| log |V|). (V = vertex, E = edge/path b/w points)

    • @stoobertb
      @stoobertb 7 ปีที่แล้ว +2

      Prim's is slightly different. Prim's will give you the Minimum Spanning Tree, which will be the shortest path that connects all cities to at least one other city, however, it may not be the shortest when traversing all cities as you may have to double back on yourself. Think of Prim's as a way of connecting all cities so all cities can be traversed using the least amount of road, however traversing that road may not be the shortest route as going directly.

    • @Habbxor
      @Habbxor 7 ปีที่แล้ว

      You're right. Prim's could lead to having to travel the same path again because it doesn't guarantee a linear path.

  • @yerkoantonioalvarez
    @yerkoantonioalvarez 5 ปีที่แล้ว +1

    Great video! But tsp requires to return to initial citie

  • @mirknankazmzad8517
    @mirknankazmzad8517 4 ปีที่แล้ว +1

    I come from the future. What the hell is pokemon go?

  • @garmurinn
    @garmurinn 3 ปีที่แล้ว

    I think you forgot to put console.log(recordDistance); between line 69 and line 70 in #35.3 in the web editor on the website.

  • @MajorMandyKitten
    @MajorMandyKitten 6 ปีที่แล้ว

    I'm in the middle of the video, so I'm not sure if you clarified the actual definition of "shallow copy".
    A shallow copy is a copy of a variable or array of variables that point to the same address in memory, thus, if you change a value of the original, you change the value of the copy.
    conversely, a deep copy will actually copy the original to a new address in memory, and allows you to change one of the variables without changing the other.

    • @TheCodingTrain
      @TheCodingTrain  6 ปีที่แล้ว

      Thanks for this info!

    • @MajorMandyKitten
      @MajorMandyKitten 6 ปีที่แล้ว

      The Coding Train this channel is pretty cool! Keep up the good work!

  • @assimez-zaky8363
    @assimez-zaky8363 3 ปีที่แล้ว

    This is relaxing

  • @WahranRai
    @WahranRai 5 ปีที่แล้ว

    Why not computing greedy algorithm (visiting the closest city...) giving you the upper bound ?

    • @netbotcl586
      @netbotcl586 5 ปีที่แล้ว

      because we want the optimal answer.

  • @amit_awadhi
    @amit_awadhi 3 ปีที่แล้ว

    This video gives me confidence😂 You're exactly like me, always trying to do things bruteforce way till they work fine🤟

  • @UQuark0
    @UQuark0 3 ปีที่แล้ว +1

    2021 outside, Shmoolebatatenooms still don't exist

  • @Tin98Tin
    @Tin98Tin 7 ปีที่แล้ว

    Please do more in Processing!

  • @louis1001
    @louis1001 7 ปีที่แล้ว +2

    Starting 2017 and people already finds old Pokémon GO :/
    Great Video!!

  • @dibibob1474
    @dibibob1474 6 ปีที่แล้ว

    smart and helpful. thanks sir :)