2160 Minimum Sum of Four Digit Number After Splitting Digits || LeetCode 2160|| Biweekly LeetCode 71
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
nice logic. I was stuck from two days.
thanks
Well explained.
Thanks bhaiya.
Thanks bhai!!!
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
Yeah!!
It's very good that you are grinding over a question this much!!
good explanation brother, thanks
What for n numbers instead of using 4 digit no. What if I use long integer? What will be the code for that
It is not very tough to think!!
Try out yourself!!
What is string(1, s[0]) mean? What is 1 inside it?
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
Sahi baat!!
what if 3,1 ka pair bnte? was this approach working ?
@@sahityaratan Please elaborate on your doubt a bit Sahitya!!
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;
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.
@@BroCoders thanks bro understood
Btw... Is this approach good?
Awesome
@@BroCoders thanks
the link to the sheet is not opening !!!!! HELP SIR.
onedrive.live.com/view.aspx?resid=633D0AA17B58E355!3089&ithint=file%2cdocx&authkey=!APXxsLmWQinD6kE
nice approach
Thanks bhai :))
bahut sare edge cases the
Yes!!