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​

Комментарии • 12

  • @GirjeshSharma-zv3xo
    @GirjeshSharma-zv3xo Месяц назад +1

    Sir jab se aapse padna shri kra h tab se coding m intrest aane lga h thank you for your hardworl❤❤

  • @RohitKumar-dz8dh
    @RohitKumar-dz8dh Месяц назад +1

    Thanks 😊 , mene ye problem priority queue se solve Kiya aur yaha aya to dekha ye problem utha complex nahi jitna mene bana diya 😂😂.

  • @a3rdtierguy864
    @a3rdtierguy864 Месяц назад +1

    mai isko map se karne ka intitution build kar diya tha but here for optimized approach

  • @PiyushSharma-we8yd
    @PiyushSharma-we8yd Месяц назад +1

    mujhe question 5 baar padhne pr bhi samajh nhi aya but jb smjh aa gya, turant solve hogya 😍😍😍

  • @Munchen888
    @Munchen888 Месяц назад

    Thank you bro! Clearly explained with dry code. 😊
    From me to you is subsciption

  • @ishu3923
    @ishu3923 Месяц назад

    sir LRU cache problem pe video bna do.

  • @dibakarbera1971
    @dibakarbera1971 Месяц назад

    thank you sir

  • @amanvishwakarma6394
    @amanvishwakarma6394 Месяц назад

    helpfull

  • @Nishant89-i2z
    @Nishant89-i2z Месяц назад

    saare question ke approach aur code visualize ho pa rahe hain