Find Missing Observations | Leetcode 2028 | MUST DO MAANG QUESTIONS | Daily Leetcode Question
Code Thoughts Code Thoughts
1.31K subscribers
69 views
5

 Published On Sep 5, 2024

Question link:- https://leetcode.com/problems/find-mi...



we have observations of n + m 6-sided dice rolls with each face numbered from 1 to 6. n of the observations went missing, and you only have the observations of m rolls. Fortunately, you have also calculated the average value of the n + m rolls.

You are given an integer array rolls of length m where rolls[i] is the value of the ith observation. You are also given the two integers mean and n.

My Approach is simple, i am first calculating the sum of the observation from the given array and then i am finding the value of the sum of the n-Observation using already given mean value, and then i am getting the n equal partition value and adding monotonically the remainder values to the array of size n and finally returning this array.


counting Sort :-
   • Sort an Array in O(n) |Counting Sort ...  

DSA Algorithms :-
   • Topological sorting in Hindi | Topolo...  
Design HLD:-
   • Design E-commerce website | Design Am...  

#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #india #hindiexplanation #hindiexplained #easyexplaination #interview #interviewtips
#interviewpreparation #interview_ds_algo #hinglish

show more

Share/Embed