1579. Remove Max Number of Edges to Keep Graph Fully Traversable | graph | leetcode daily | Hindi

Поділитися
Вставка
  • Опубліковано 8 вер 2024
  • Problem Name:
    1579. Remove Max Number of Edges to Keep Graph Fully Traversable
    Problem Statement:
    Alice and Bob have an undirected graph of n nodes and three types of edges:
    Type 1: Can be traversed by Alice only.
    Type 2: Can be traversed by Bob only.
    Type 3: Can be traversed by both Alice and Bob.
    Given an array edges where edges[i] = [typei, ui, vi] represents a bidirectional edge of type typei between nodes ui and vi, find the maximum number of edges you can remove so that after removing the edges, the graph can still be fully traversed by both Alice and Bob. The graph is fully traversed by Alice and Bob if starting from any node, they can reach all other nodes.
    Return the maximum number of edges you can remove, or return -1 if Alice and Bob cannot fully traverse the graph.
    Problem link:
    leetcode.com/p...
    Java Plus DSA Placement Course Playlist:
    • Java and DSA Course Pl...
    Java Plus DSA Sheet:
    docs.google.co...
    Notes:
    github.com/Tiw...
    Telegram Link:
    shashwattiwari...
    Ultimate Recursion Series Playlist:
    • Recursion and Backtrac...
    Instagram Handle: (@shashwat_tiwari_st)
    shashwattiwari...
    Samsung Interview Experience:
    • I cracked Samsung | SR...
    Company Tags:
    Facebook | Amazon | Microsoft | Netflix | Google | LinkedIn | Pega Systems | VMware | Adobe | Samsung
    Timestamp:
    0:00 - Introduction
    #ShashwatTiwari #coding​​ #problemsolving​

КОМЕНТАРІ • 6

  • @SAURABHKUMAR-yo7er
    @SAURABHKUMAR-yo7er 2 місяці тому

    great lec

  • @shashwat_tiwari_st
    @shashwat_tiwari_st  2 місяці тому +2

    Please watch DSU first DSU( Disjoint Sets): ua-cam.com/video/7wgUuv0U5zs/v-deo.html

    • @keshavgupta9174
      @keshavgupta9174 2 місяці тому

      Bhaiya yeh graph series start krdi kya ?

    • @shashwat_tiwari_st
      @shashwat_tiwari_st  2 місяці тому +1

      @@keshavgupta9174 abhi ek video dali hai bs DSU ki because aaj ka question solve krne ke liye required hai... graphs nhi aate toh abhi skip krdo, iske pehle 12 lectures aur aaenge. kal se start hai

    • @keshavgupta9174
      @keshavgupta9174 2 місяці тому

      @@shashwat_tiwari_st haanji ❤

  • @RohitKumar-dz8dh
    @RohitKumar-dz8dh 2 місяці тому +1

    Thanks 😊