DFS With Slashes - Coding Interview Stream Highlights

Sdílet
Vložit
  • čas přidán 15. 10. 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...

Komentáře • 64

  • @Errichto
    @Errichto  Před 3 lety +9

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

  • @mrigmarichika
    @mrigmarichika Před 3 lety +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  Před 3 lety +20

      Thank you for these nice words :)

  • @azurnxo2134
    @azurnxo2134 Před 3 lety +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  Před 3 lety +3

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

  • @kewtomrao
    @kewtomrao Před rokem

    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 Před 3 lety

    very good explanation

  • @user-sv4nq8vq1s
    @user-sv4nq8vq1s Před 3 lety +11

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

  • @himanshidixit6406
    @himanshidixit6406 Před 3 lety +1

    this guy killed it !!

  • @sahilsharma2952
    @sahilsharma2952 Před 3 lety +4

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

  • @lucky-bj9de
    @lucky-bj9de Před 3 lety

    Thanks!

  • @AudioManiiac
    @AudioManiiac Před 3 lety +5

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

  • @cristianouzumaki2455
    @cristianouzumaki2455 Před 3 lety

    Wow, You really are at another level.

  • @codewithkolhar3131
    @codewithkolhar3131 Před 3 lety +3

    Your typing has become so swift and accurate.

    • @Errichto
      @Errichto  Před 3 lety +5

      Was it ever different? ;p

    • @codewithkolhar3131
      @codewithkolhar3131 Před 3 lety

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

  • @pankajdebroy1852
    @pankajdebroy1852 Před 3 lety

    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.

  • @shraeverma9815
    @shraeverma9815 Před 3 lety

    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  Před 3 lety +3

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

    • @shraeverma9815
      @shraeverma9815 Před 3 lety

      OK I will start dp at the end of November

  • @fuadhasan3762
    @fuadhasan3762 Před 3 lety

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

  • @Sauravk2107
    @Sauravk2107 Před 11 měsíci

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

  • @draxd3045
    @draxd3045 Před 3 lety

    like it so much

  • @yennefer415
    @yennefer415 Před 3 lety +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  Před 3 lety +3

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

  • @EC52811
    @EC52811 Před 3 lety

    How long have you been doing this?

  • @mrklyr3761
    @mrklyr3761 Před 3 lety

    idol!

  • @khalidshahriar4201
    @khalidshahriar4201 Před 3 lety +1

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

    • @FoodieKing
      @FoodieKing Před 3 lety

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

  • @Amritanjali
    @Amritanjali Před 3 lety +1

    your linkdin id??

  •  Před 3 lety

    Which mechanical keyboard you are using?

  • @user-qm4jh2oj6f
    @user-qm4jh2oj6f Před 3 lety +1

    What is the name of IDE that Errichto uses?

  • @EncikSejati
    @EncikSejati Před 3 lety

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

  • @bhargavgohil25
    @bhargavgohil25 Před 3 lety

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

    • @picoder5924
      @picoder5924 Před 3 lety +2

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

  • @talhataki5855
    @talhataki5855 Před 3 lety +4

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

    • @Errichto
      @Errichto  Před 3 lety +9

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

  • @iprakhar22
    @iprakhar22 Před 3 lety

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

  • @abdurrahaman388
    @abdurrahaman388 Před 3 lety +1

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

    • @Errichto
      @Errichto  Před 3 lety +8

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

    • @abdurrahaman388
      @abdurrahaman388 Před 3 lety

      @@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  Před 3 lety +6

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

  • @dashgaming3713
    @dashgaming3713 Před 3 lety

    Should I do maths first or DSA?

    • @carloscerritoslira328
      @carloscerritoslira328 Před 3 lety

      definitely DSA

    • @Errichto
      @Errichto  Před 3 lety +2

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

    • @dashgaming3713
      @dashgaming3713 Před 3 lety

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

    • @Errichto
      @Errichto  Před 3 lety +2

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

  • @dashgaming3713
    @dashgaming3713 Před 3 lety

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

    • @carloscerritoslira328
      @carloscerritoslira328 Před 3 lety +1

      I think errichto went from 0 to red in 6 months

    • @Errichto
      @Errichto  Před 3 lety +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 Před 3 lety

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

  • @mrp3443
    @mrp3443 Před 3 lety +1

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

    • @Errichto
      @Errichto  Před 3 lety +3

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

    • @Errichto
      @Errichto  Před 3 lety +2

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

  • @nowyty556
    @nowyty556 Před 3 lety

    what is your IQ level?

  • @animeshpathak3921
    @animeshpathak3921 Před 3 lety +1

    I have piles

  • @dashgaming3713
    @dashgaming3713 Před 3 lety +1

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

  • @lyrdum1158
    @lyrdum1158 Před 3 lety +2

    First?

  • @codedoctor3265
    @codedoctor3265 Před 21 dnem

    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
    ```