2285. Maximum Total Importance of Roads | graph | leetcode daily challenge | DSA | Hindi
HTML-код
- Опубликовано: 22 авг 2024
- Problem Name:
2285. Maximum Total Importance of Roads
Problem Statement:
You are given an integer n denoting the number of cities in a country. The cities are numbered from 0 to n - 1.
You are also given a 2D integer array roads where roads[i] = [ai, bi] denotes that there exists a bidirectional road connecting cities ai and bi.
You need to assign each city with an integer value from 1 to n, where each value can only be used once. The importance of a road is then defined as the sum of the values of the two cities it connects.
Return the maximum total importance of all roads possible after assigning the values optimally.
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
Sir jab se aapse padna shri kra h tab se coding m intrest aane lga h thank you for your hardworl❤❤
Thanks 😊 , mene ye problem priority queue se solve Kiya aur yaha aya to dekha ye problem utha complex nahi jitna mene bana diya 😂😂.
mai isko map se karne ka intitution build kar diya tha but here for optimized approach
mujhe question 5 baar padhne pr bhi samajh nhi aya but jb smjh aa gya, turant solve hogya 😍😍😍
Thank you bro! Clearly explained with dry code. 😊
From me to you is subsciption
sir LRU cache problem pe video bna do.
thank you sir
helpfull
saare question ke approach aur code visualize ho pa rahe hain