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 🥺
@goldenx2417Ай бұрын
Thank you Bhaiya for cpp solution ❤
@stith_pragyaАй бұрын
Thanks a ton for the help......🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻 Great Explaination....... Keep posting such videos, it is really helpful.....🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@debaratighatak2211Ай бұрын
your explanation is soo good 🙏 thanks for covering all the edge cases so well
@travellingsim2174Ай бұрын
Great explanation!
@striver011Ай бұрын
Great video aryan.!
@neversettle756Ай бұрын
Great explanation
@Its_Shubham_NegiАй бұрын
Thanks bhaiya !!!!
@VK_BRANDINGАй бұрын
great man >>
@devsharma181Ай бұрын
Why are we maximising the outlier ? Why not simply assigning answer to the potential outlier
@user-oi3iu7np9lАй бұрын
question requires us to maximize it
@dayashankarlakhotia4943Ай бұрын
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; } 🎉❤