@@PrimeeeeeTie Time Complexity is More in unorderd_map in large data sets due to collisions. The TLE issue arises because of the way unordered_map handles hashing and collisions compared to map.
Bhai mera wrong answer dikha rha h but almost aisa hi logic tha... Maine original array ko sort karke aur dusre elements ko maximum element se replace phir number of distinct elements se output karaya... But wrong answer aaya hai..kya galat kiya?
bhai ye learning k liye h, mujhse ye problem contest me nhi solve hui aur bahi upsolve kr rha hoon, bhai ne contest k baad upload ki h, dont blindly discourage someone. and if you think ki keval cf profile dekh ke recruit krlenge, then GOD help you
nice explanation for B problem, thanks
Thanks 👍
I used unordered map in contest and I got tle
yeah bro same
C??
Sir mera bhi almost same solution h but TLE aa rha
use map instead of unordered_map
@@nilayjain9070 bro iska reason batao yr unordered_map ki jagah map use krne se kyu fast hua?
@@PrimeeeeeTie Time Complexity is More in unorderd_map in large data sets due to collisions.
The TLE issue arises because of the way unordered_map handles hashing and collisions compared to map.
@@nilayjain9070 bruh wtf the time complexity in unordered map is O(1) and map is O(log n)
C kiya kya?
Abhi nahi hua bhai
Bhai mera wrong answer dikha rha h but almost aisa hi logic tha...
Maine original array ko sort karke aur dusre elements ko maximum element se replace phir number of distinct elements se output karaya...
But wrong answer aaya hai..kya galat kiya?
Ekbaar koi check kardo please
Kyu cheating krwa rhe ho bhai.. deserving logo ki intern/placement mein problem aati hai
Bro uploading time dekho.
Don't just blame someone blindly.
bhai placement/intern mei blindly cf profile dekh ke recruit nhi karte ...personal interview naam ki chhez hoti h
bhai ye learning k liye h, mujhse ye problem contest me nhi solve hui aur bahi upsolve kr rha hoon, bhai ne contest k baad upload ki h, dont blindly discourage someone.
and if you think ki keval cf profile dekh ke recruit krlenge, then GOD help you