2160 Minimum Sum of Four Digit Number After Splitting Digits || LeetCode 2160|| Biweekly LeetCode 71

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 4. 02. 2022
  • Here in this video we have discussed the approach to solve
    2160 Minimum Sum of Four Digit Number After Splitting Digits of Biweekly Contest 71 .
    Question Link :- leetcode.com/contest/biweekly...
    Code Link :-
    Presenting you the best placement preparation course document down here
    👇(You can download the sheet and use it as a tracker as per your convenience).
    ⭐ Link for the Bro Coders PPC sheet:- onedrive.live.com/view.aspx?r... After this if you need doubt support join our telegram channel for getting it solved
    đŸ‘‡đŸ»
    🔔Join the telegram channel for doubts and discussions:-t.me/joinchat/wSYWX-gbgoRjNmNl
    If you follow this course in sequential manner it would be most optimal. Otherwise if you are at intermediate level and want selective preparation of any particular topic you can jump directly, otherwise it's not suggested. And also since it's our new endeavor to help out students with quality education free of cost . So please help us in this mission!!!
    ❇ Like, Share, Subscribe!!
    ========================================================================
    🔔Follow us on Instagram:- / bro_codrs
    🔔Join the telegram channel for doubts and discussions:-t.me/joinchat/wSYWX-gbgoRjNmNl
    ========================================================================
    Link to our other major series:-
    ✅Dynamic Programming: czcams.com/users/playlist?list...
    ✅Recursion: czcams.com/users/playlist?list...
    ✅Backtracking: czcams.com/users/playlist?list...
    ✅Greedy: czcams.com/users/playlist?list...
    ✅Array: czcams.com/users/playlist?list...
    ✅Hashing: czcams.com/users/playlist?list...
    ✅Linked List: czcams.com/users/playlist?list...
    ✅Binary Search Tree : ‱ Search in a Binary Sea...
    ✅Binary Tree : ‱ Binary Tree -Course In...
    ✅Stack : ‱ Parenthesis Checker |...
    ✅Queue : ‱ Queue Basics and STL||...
    ✅Maths: ‱ Find factors , check f...
    ========================================================================
    đŸ”±To buy books at excessive cheap prices and sell your old books, visit :- www.bookstop.me
    ========================================================================
    For convenience, refer to given timestamps:-
    ========================================================================
    #BroCoders #LeetCode #InteviewBits #GFG #PlacementCourse #dp #stack #queue #maths #greedy #array #binaryTree #BST #Graphs #recursion #backtracking #string #stl #c++ #java #DSA #CompetitveProgramming #CodeForces #CodeChef #ICPC #CompetitiveCoding #FreePlacementSeries #Microsoft #Google #Amazon #Apple #Facebook #FlipKart #Netflix #TowerResearch #VMWare #DirectI #CodeNation #Infosys #GoldmanSachs #TCS #Tier3 #IIT #NIT #IIIT #Interview #Aptitude #Contest #CodingContest #HackerRank #HackerEarth #BinarySearch #BroCode #Trending #PlacementUpdates #PlacementNotification #IntenshipUpdates #InternshipNotification #LinkedIn #Samsung #Naukri #SoftwareEngineer #Hackathon #SoftwareDevelopmentEngineer #SDE #IT #ComputerScience #CSE #FAANG #DynamicProgramming #2129#LeetCode #CapitalisetheTitle #BiweeklyLeetCode
    Biweekly70 #2129 #solution #answer #Fastest_answer
    2160 Minimum Sum of Four Digit Number After Splitting Digits || LeetCode 2160|| Biweekly LeetCode 71
    2160 Minimum Sum of Four Digit Number After Splitting Digits || LeetCode 2160|| Biweekly LeetCode 71
    2160 Minimum Sum of Four Digit Number After Splitting Digits || LeetCode 2160|| Biweekly LeetCode 71
    2160 Minimum Sum of Four Digit Number After Splitting Digits || LeetCode 2160|| Biweekly LeetCode 71
    2160 Minimum Sum of Four Digit Number After Splitting Digits || LeetCode 2160|| Biweekly LeetCode 71

Komentáƙe • 26

  • @AbhishekSingh-ub2ls
    @AbhishekSingh-ub2ls Pƙed rokem +2

    nice logic. I was stuck from two days.

  • @rickwarty
    @rickwarty Pƙed rokem +1

    thanks

  • @pawankanttiwari8173
    @pawankanttiwari8173 Pƙed 2 lety +2

    Well explained.
    Thanks bhaiya.

  • @arjunyadav-kt5jr
    @arjunyadav-kt5jr Pƙed rokem +2

    i am so glad, maine bas approach suni aur code karne chala gaya, mai samajh raha tha apka code few liner hoga, and i was continuously thinking to optimize it, but then what i coded was so close to what you showed... take a look❣
    _____________________________________________________________________________
    class Solution {
    public:
    int minimumSum(int num) {
    int arr[4], rem, temp;
    for(int i=0; i

    • @BroCoders
      @BroCoders  Pƙed rokem

      Yeah!!
      It's very good that you are grinding over a question this much!!

  • @Rizwankhan-ts3gk
    @Rizwankhan-ts3gk Pƙed rokem

    good explanation brother, thanks

  • @JeetAcharya-ev4rc
    @JeetAcharya-ev4rc Pƙed 2 lety +2

    What for n numbers instead of using 4 digit no. What if I use long integer? What will be the code for that

    • @BroCoders
      @BroCoders  Pƙed 2 lety

      It is not very tough to think!!
      Try out yourself!!

  • @purnimahianl5678
    @purnimahianl5678 Pƙed 11 měsĂ­ci

    What is string(1, s[0]) mean? What is 1 inside it?

  • @whitedracarys7613
    @whitedracarys7613 Pƙed 2 lety +2

    bro O(1) nhi sujta contest ke waqt
    my approach : saari permutation nikali array me
    aur hr ka 2 2 pair bnna ke minSum calculate krlia

    • @BroCoders
      @BroCoders  Pƙed 2 lety

      Sahi baat!!

    • @sahityaratan
      @sahityaratan Pƙed 2 lety +1

      what if 3,1 ka pair bnte? was this approach working ?

    • @BroCoders
      @BroCoders  Pƙed 2 lety

      @@sahityaratan Please elaborate on your doubt a bit Sahitya!!

  • @thegreekgoat98
    @thegreekgoat98 Pƙed 2 lety +3

    WHY THIS IS NOT WORKING?
    vectorv(4);
    while(num!=0)
    {
    int rem=num%10;
    v.push_back(rem);
    num=num/10;
    }
    sort(v.begin(),v.end());
    int sum1=v[0]*10+v[2];
    int sum2=v[1]*10+v[3];
    return sum1+sum2;

    • @BroCoders
      @BroCoders  Pƙed 2 lety +1

      here, actually you have initialized the size of v which is 4 and then you are pushing back in the while loop so that goes in the 5 th ps and ........ . Therefore the 1st 4 pos contains garbage.
      I hope you understood.

    • @thegreekgoat98
      @thegreekgoat98 Pƙed 2 lety

      @@BroCoders thanks bro understood

    • @thegreekgoat98
      @thegreekgoat98 Pƙed 2 lety

      Btw... Is this approach good?

    • @BroCoders
      @BroCoders  Pƙed 2 lety +2

      Awesome

    • @thegreekgoat98
      @thegreekgoat98 Pƙed 2 lety

      @@BroCoders thanks

  • @ayushrautela8567
    @ayushrautela8567 Pƙed rokem +1

    the link to the sheet is not opening !!!!! HELP SIR.

    • @BroCoders
      @BroCoders  Pƙed rokem

      onedrive.live.com/view.aspx?resid=633D0AA17B58E355!3089&ithint=file%2cdocx&authkey=!APXxsLmWQinD6kE

  • @swarupsarangi734
    @swarupsarangi734 Pƙed 2 lety +1

    nice approach

  • @Reenasharma-be3ys
    @Reenasharma-be3ys Pƙed 2 lety +1

    bahut sare edge cases the