1579. Remove Max Number of Edges to Keep Graph Fully Traversable | graph | leetcode daily | Hindi
HTML-код
- Опубликовано: 22 авг 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
Please watch DSU first DSU( Disjoint Sets): ruclips.net/video/7wgUuv0U5zs/видео.html
Bhaiya yeh graph series start krdi kya ?
@@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
@@shashwat_tiwari_st haanji ❤
great lec
Thanks 😊