DFS With Slashes - Coding Interview Stream Highlights

Поділитися
Вставка
  • Опубліковано 15 жов 2020
  • Highlights of Thursday Coding Interview live-stream.
    I'm streaming regularly on Twitch now! Coding interview problems on Thursday, and Competitive Programming on Tuesday & Saturday. / errichto
    Problem link: leetcode.com/problems/regions...
    Watch the full VOD here: • Coding Interviews Are ...
    - second YT channel for screencasts and old live-streams: / errichto2
    - FB and Twitter: / errichto & / errichto
    - Frequently Asked Questions: github.com/Errichto/youtube/w...

КОМЕНТАРІ • 64

  • @Errichto
    @Errichto  3 роки тому +9

    Tune in any Thursday on www.twitch.tv/errichto for coding interview problem-solving!
    (or Tuesday/Saturday for competitive programming)

  • @mrigmarichika
    @mrigmarichika 3 роки тому +67

    and once Kamil , you said : what's life if you don't do anything for others, life is about creating an impact in the world, smaller or bigger🌻.You have definitely created an impact, not only as a competitive programmer but also as a mentor and human being.💛

    • @Errichto
      @Errichto  3 роки тому +20

      Thank you for these nice words :)

  • @AudioManiiac
    @AudioManiiac 3 роки тому +5

    Could you explain why your XOR logic works? I don't understand how you came to that conclusion so quickly

  • @azurnxo2134
    @azurnxo2134 3 роки тому +1

    You are awesome!
    PS: Where should I start from to get into CP? I have 0 knowledge of C++ and watching you code like that have boosted my confidence!
    tyy

    • @Errichto
      @Errichto  3 роки тому +3

      well, first learn C++ by doing any tutorial online

  • @pankajdebroy1852
    @pankajdebroy1852 3 роки тому

    Sir, I want to learn CPP for competitive programming, what book should I choose for learning CPP from beginning to advance?
    My knowledge in CPP is 0.

  • @sahilsharma2952
    @sahilsharma2952 3 роки тому +4

    Once you start explaining, Its damn easy. How come I didn't think of that!!

  • @kewtomrao
    @kewtomrao Рік тому

    Finally understood it.
    Thanks.
    Having so much knowledge and making a dumb person like me understand requires great teaching capabilities.
    Thanks a lot!

  • @agayevrauf
    @agayevrauf 3 роки тому

    very good explanation

  • @himanshidixit6406
    @himanshidixit6406 3 роки тому +1

    this guy killed it !!

  • @lucky-bj9de
    @lucky-bj9de 3 роки тому

    Thanks!

  • @cristianouzumaki2455
    @cristianouzumaki2455 3 роки тому

    Wow, You really are at another level.

  • @codewithkolhar3131
    @codewithkolhar3131 3 роки тому +3

    Your typing has become so swift and accurate.

    • @Errichto
      @Errichto  3 роки тому +5

      Was it ever different? ;p

    • @codewithkolhar3131
      @codewithkolhar3131 3 роки тому

      @@Errichto no, but it has now become even better and very faster.

  • @EC52811
    @EC52811 3 роки тому

    How long have you been doing this?

  • @fuadhasan3762
    @fuadhasan3762 3 роки тому

    Hello,Errichto..can you make a video about base-n's in programming..please..

  • @user-sv4nq8vq1s
    @user-sv4nq8vq1s 3 роки тому +11

    Errichto : Soon I will be regaining LGM.
    Enter Among us.........

  • @yennefer415
    @yennefer415 3 роки тому +1

    What place do you recommend to learn basic properties about vectors, maps, dfs, bfs etc. (dont even know what those last two are) Im overall new to coding so Im still discovering more and more techniques/types of storing informations/algorithm functions etc.
    //Ze wzgledu na moj biedny angielski:
    W skrocie - gdzie polecalbys uczyc sie nie tyle umiejetnosci logicznego myslenia, rozwiazywania problemow, co samej skladni jezyka, w tym najbardziej przydatnych obiektow, funkcji itd.

    • @Errichto
      @Errichto  3 роки тому +3

      Any C++ tutorial online. I learned 10 years ago, those websites don't even exist anymore.

  • @Sauravk2107
    @Sauravk2107 11 місяців тому

    14:37 here how did you come up with ^ logic ? Amazing

  • @shraeverma9815
    @shraeverma9815 3 роки тому

    Hi Brother! You got a new subscriber today and i have a ques--Is dynamic programming recommended for beginners? I know c++ and a few algorithms (& have lot of patience also :))

    • @Errichto
      @Errichto  3 роки тому +3

      Nah, you can wait with dp for quite some time.

    • @shraeverma9815
      @shraeverma9815 3 роки тому

      OK I will start dp at the end of November

  • @user-qm4jh2oj6f
    @user-qm4jh2oj6f 3 роки тому +1

    What is the name of IDE that Errichto uses?

  •  3 роки тому

    Which mechanical keyboard you are using?

  • @draxd3045
    @draxd3045 3 роки тому

    like it so much

  • @bhargavgohil25
    @bhargavgohil25 3 роки тому

    Didn't get the XOR part... Can anybody please explain that part?

    • @picoder5924
      @picoder5924 3 роки тому +2

      0^1-> 1
      1^1-> 0
      It's just like swaping 0 and 1 every time

  • @Amritanjali
    @Amritanjali 3 роки тому +1

    your linkdin id??

  • @mrklyr3761
    @mrklyr3761 3 роки тому

    idol!

  • @khalidshahriar4201
    @khalidshahriar4201 3 роки тому +1

    Those who are asking what errichto does for living just check his linkedin profile.

    • @FoodieKing
      @FoodieKing 3 роки тому

      Kuch Nahi Mila Bhai...comment me.link Dal

  • @EncikSejati
    @EncikSejati 3 роки тому

    i had no idea what im watching .just understand few statement liek if and void @@.is this java @@

  • @iprakhar22
    @iprakhar22 3 роки тому

    It's never too late to put bumbags into your style, Kamil

  • @abdurrahaman388
    @abdurrahaman388 3 роки тому +1

    How to increase solving speed in cf Problem-c,d

    • @Errichto
      @Errichto  3 роки тому +8

      Practice. What other answer could you possible expect? :/

    • @abdurrahaman388
      @abdurrahaman388 3 роки тому

      @@Errichto any other tricks probably 😅 I am good at long challenges (5* @ codechef) but didn't able to solve fast enough so I lacked in short contests.

    • @Errichto
      @Errichto  3 роки тому +6

      @@abdurrahaman388 My general "how to practice" advice is here github.com/Errichto/youtube/wiki/How-to-practice%3F

  • @dashgaming3713
    @dashgaming3713 3 роки тому

    Should I do maths first or DSA?

    • @carloscerritoslira328
      @carloscerritoslira328 3 роки тому

      definitely DSA

    • @Errichto
      @Errichto  3 роки тому +2

      If you suck at school math, maybe catch up with that first before learning DSA.

    • @dashgaming3713
      @dashgaming3713 3 роки тому

      @@Errichto maths of Class 8 to 10th right??

    • @Errichto
      @Errichto  3 роки тому +2

      @@dashgaming3713 I don't know. Just solve easy algo problems and see if you lack some math knowledge.

  • @talhataki5855
    @talhataki5855 3 роки тому +4

    Errichto, will you play "among us" in your discord server with some noob programmers like me. :)

    • @Errichto
      @Errichto  3 роки тому +9

      Well, I already did ;p
      I don't know if I will play again, we'll see.

  • @dashgaming3713
    @dashgaming3713 3 роки тому

    How much years does it take to become a red coder??

    • @carloscerritoslira328
      @carloscerritoslira328 3 роки тому +1

      I think errichto went from 0 to red in 6 months

    • @Errichto
      @Errichto  3 роки тому +10

      2-5 years if you already know programming and you are very good at math. It's a bit like asking "how many years to get to the national football team". Some people can try and never get there.

    • @dashgaming3713
      @dashgaming3713 3 роки тому

      @@Errichto for a bigginer ?? I want to crack kickstart and code jam lol

  • @mrp3443
    @mrp3443 3 роки тому +1

    Can you make full roadmap like video to learn programming language to become red coder

    • @Errichto
      @Errichto  3 роки тому +3

      Go to Codeforces, sort problems by difficulty, solve them in this order.
      You're welcome :D

    • @Errichto
      @Errichto  3 роки тому +2

      If you want some serious advice, read this github.com/Errichto/youtube/wiki/How-to-practice%3F

  • @nowyty556
    @nowyty556 3 роки тому

    what is your IQ level?

  • @animeshpathak3921
    @animeshpathak3921 3 роки тому +1

    I have piles

  • @lyrdum1158
    @lyrdum1158 3 роки тому +2

    First?

  • @dashgaming3713
    @dashgaming3713 3 роки тому +1

    Errichto help me I don't understand DSA at all :(

  • @codedoctor3265
    @codedoctor3265 12 днів тому

    Clean Code
    ```
    class Solution(object):
    def regionsBySlashes(self, grid):
    """
    :type grid: List[str]
    :rtype: int
    """
    n = len(grid)
    # Create a visited matrix for each small triangle in the 2n x 2n grid
    visited = [[False] * (n * 3) for _ in range(n * 3)]
    def dfs(x, y):
    if x < 0 or x >= n * 3 or y < 0 or y >= n * 3 or visited[x][y]:
    return
    visited[x][y] = True
    directions = [(-1, 0), (1, 0), (0, -1), (0, 1)]
    for dx, dy in directions:
    dfs(x + dx, y + dy)
    # Mark the slashes in the 2n x 2n grid
    for i in range(n):
    for j in range(n):
    if grid[i][j] == '/':
    visited[i * 3][j * 3 + 2] = True
    visited[i * 3 + 1][j * 3 + 1] = True
    visited[i * 3 + 2][j * 3] = True
    elif grid[i][j] == '\\':
    visited[i * 3][j * 3] = True
    visited[i * 3 + 1][j * 3 + 1] = True
    visited[i * 3 + 2][j * 3 + 2] = True
    regions = 0
    for i in range(n * 3):
    for j in range(n * 3):
    if not visited[i][j]:
    dfs(i, j)
    regions += 1
    return regions
    ```