Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
C++ Code - leetcode.com/problems/identify-the-largest-outlier-in-an-array/submissions/1467120998/Please do share with your friends or social media, it will be super super helpful 🥺
Thank you Bhaiya for cpp solution ❤
Thanks a ton for the help......🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻Great Explaination.......Keep posting such videos, it is really helpful.....🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
your explanation is soo good 🙏 thanks for covering all the edge cases so well
Great explanation!
Great explanation
Great video aryan.!
great man >>
Thanks bhaiya !!!!
Why are we maximising the outlier ? Why not simply assigning answer to the potential outlier
question requires us to maximize it
public int getLargestOutlier(int[]nums){int ans=Integer.MIN_VALUE,totSum=0;Mapmpp=new HashMap();for(int num:nums){totSum+=num;mpp.put(num*2,mpp.getOrDefault(num*2,0)+1);}for(int num:nums){int sum=totSum-num;if(mpp.getOrDefault(sum,0)>=2||(mpp.getOrDefault(sum,0)==1)&&(sum!=num*2))ans=Math.max(ans,num);}return ans;}🎉❤
C++ Code - leetcode.com/problems/identify-the-largest-outlier-in-an-array/submissions/1467120998/
Please do share with your friends or social media, it will be super super helpful 🥺
Thank you Bhaiya for cpp solution ❤
Thanks a ton for the help......🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
Great Explaination.......
Keep posting such videos, it is really helpful.....🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
your explanation is soo good 🙏 thanks for covering all the edge cases so well
Great explanation!
Great explanation
Great video aryan.!
great man >>
Thanks bhaiya !!!!
Why are we maximising the outlier ? Why not simply assigning answer to the potential outlier
question requires us to maximize it
public int getLargestOutlier(int[]nums){
int ans=Integer.MIN_VALUE,totSum=0;
Mapmpp=new HashMap();
for(int num:nums){
totSum+=num;
mpp.put(num*2,mpp.getOrDefault(num*2,0)+1);
}
for(int num:nums){
int sum=totSum-num;
if(mpp.getOrDefault(sum,0)>=2||(mpp.getOrDefault(sum,0)==1)&&(sum!=num*2))
ans=Math.max(ans,num);
}
return ans;
}
🎉❤