### huzaifa242's blog

By huzaifa242, 10 months ago, ,

Hello Community,

It gives me immense pleasure to invite you all to yet another contest of newly started series of Contest by HackerEarth called Data Structures and Algorithms (DSA). This is a 1.5 hour contest with 3 questions to solve.

The problems of October 2019 edition are classic and educational as against being creative and challenging. So, if you're learning new things, don't miss the DSA contests.

Problem setting panel includes Anay anay_07 Loya, Tanmay tanmay2904 Agarwal, Huzaifa huzaifa242 Mankda.

Tester for the Contest is AmirReza Arpa PoorAkhavan.

The contest would go live on October 12th 4:00AM UTC

Good Luck & High Ratings!!!

• +22

By huzaifa242, history, 11 months ago, ,

Hello Community,

I am writing this blog on behalf of deep9539. Recently his account was hacked by someone and now He is unable to get back access to his account.

I kindly request the people with corresponding authorisation and access to admin panel to please help him restore his account. For any communication regarding this issue you can contact me and I'll convey him the message. He is a friend of mine.

Please look into this matter and help the actual owner of the account restore his access.

If anyone is suspecting that i might want to get access to his account then please look at following links, We belong to same University.

My Friend's Codechef Profile

UPDATE: Issue Solved. Thanks MikeMirzayanov.

• -40

By huzaifa242, history, 14 months ago, ,

I read this Blog on DSU on trees.

Now, I have a doubt.

Given a tree with n nodes and each node has some color c[i], following query needs to be answered

1 x y: change color of node x to y

2 u c: count all the nodes with color c in subtree of u.

How to approach this??

• +4

By huzaifa242, history, 21 month(s) ago, ,

In past few days I have faced this problem very frequently. Implementing same Logic with set gives AC where as vector implementation gives TLE OR MLE.

Question 1

TLE Solution

AC Solution

I just changed the set implementation to set in order to check the running time.

MLE Solution

AC SOlution

Above is the example of MLE v/s AC.

If anyone could tell me what I am mising...