Technical Interview Question - Max Area of Island [LeetCode]

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

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

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

    I'd recommend using a set (or hashset) to keep track of the visited locations (i, j) because setting grid[i][j] from 1 to 0 (from land to water) introduces a side effect, meaning that the same 'grid' variable will not be reusable after the call without making a deep copy of it first.

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

    this guy is better than most youtubers in explanation.👌

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

    You explain the problems so well bro. Keep it up!

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

    Thank you so much. Your explanations are so good! Now I can solve such questions with ease.

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

    Very simple explanation. Thanks a ton !!!

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

    Hi Michael, thank you so much for the explanation. I really like to watch your video. Please keep doing them. Can you please also do a video about leetcode 547 friend circles? It seems very similar to this question but not the same and I got very confused.

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

      Thank you, will do!

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

      @@AlgosWithMichael Thank you so much Michael!! Millions of thanks!! I am watching your other videos.

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

    Great Content!

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

    is "grid" parameter in "getArea( )" counted is the space complexity ???

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

      No because grid is being passed by reference.

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

    Nice Explaination :")