discord server: discord.com/invite/H8TeFjvq6z PS- I've started being more active in the community to teach and learn new things on my discord, this new endeavour leaves me with less time to focus on editorial creation. Kaushik came to rescue at the perfect time and I hope that he'd continue to post content! Please let us know if we can do something better!
@Bharat_Rider Жыл бұрын
Nice explanation bro I had understood before but now its more clear
@virajvrj Жыл бұрын
Super easy explanation. 💯💯🔥 ThankYou 😌
@MrKrabs-xf2tr Жыл бұрын
You're responsible for the success of so many. Thank you sir!
@vivekmanwar4658 Жыл бұрын
Loved the explanation, crystal clear approach 🔥🔥
@demonosky Жыл бұрын
Wonderful explanation , keep it up !🎉
@Algorithmswithsubham Жыл бұрын
Super easy to understand explanation
@KeshavGupta-ev5sv Жыл бұрын
Nice explanation man 😄
@KishanKumar-mf5ru Жыл бұрын
Nice explanation 🔥 continue it
@x_x3557 Жыл бұрын
If we perform the operations in the following sequence: i=4, i=2, i=3 as given below, the final xor obtained will be c, e, f which is not contiguous. How is this possible? [a, b, c, d, e, f] (e, f) (c, d, e, f), (e, f) (d, e, f), (c, d, e, f), (e, f) final xor = c, e, f
@Arjunkumar-lu9ow Жыл бұрын
Nice explanation👏
@gokuluppal9749 Жыл бұрын
🔥nice explanation 😁
@not_at_all_37 Жыл бұрын
why you take the sum from 0 to n-k ?? and why should we need to elemenate the k-1 largest element?
@cromyl4815 Жыл бұрын
there are n-1 total number of possible differences between the adjacent elements. Starting a new group removes one of these values from ....Example (a1 a2)(a3 a4) here the difference |a2-a3| will not be considered becoz they belong to different groups. also, since there are 2 groups, only one of the adjacent elements' difference is removed .. that is why we have to leave the first k-1 largest differences.
@gokuluppal9749 Жыл бұрын
Bro contest ke during hi solution video bnadiya kr aur badhiya hoga😂😂
@alfahimbin7161 Жыл бұрын
``` 12 8 1 9 8 2 3 3 1 8 7 7 9 2``` in here diff arr is = 8 1 6 1 0 2 7 1 0 2 7 sorted version is = 0 0 1 1 1 2 2 6 7 7 8. in total 8 segment 0 0 1 1 "1 2 2 6 7 7 8" these 7 have largest contribution so we will consider them as 7 diff group as they will only add more(but now as len is 1 their contirb is 0) . so we will consider the first 4 = 0 0 1 1 as one group. thus creating total 8 group right?
@veljkomladenovic8397 Жыл бұрын
that's correct
@veljkomladenovic8397 Жыл бұрын
void solve(){ int n, k; cin >>n>>k; vectora(n); forn(i,n) cin >> a[i]; vectorans(n-1); for (int i=0;i