cp-geeks-adgitm / Hacktoberfest

Everyone is free to contribute. Not eligible for Hacktoberfest
GNU General Public License v3.0
32 stars 95 forks source link

Distinct Colors CSES #276

Closed 18o3 closed 1 year ago

18o3 commented 1 year ago

Used the technique of DSU on tree (also called Sack on tree) to answer queries about number of distinct values in the subtree of all nodes.

18o3 commented 1 year ago

This is a Hacktoberfest PR so can you please add the "HACKTOBERFEST-ACCEPTED LABEL" if you merge my pull request . Thank You

cpgeeksadgitm commented 1 year ago

@18o3 Thanks for the awesome pr's, but you need to add the testcase with input and expected output. If you could provide link for the all the problems from where you have taken.

And please attach the online compiler link, where I can test your code. Please do the same with all the Pr's. Your contribution is appreciated.

18o3 commented 1 year ago

Thanks for the feedback. Will correct it. Can you please provide an accepted pull request link where I can see the format in which I am supposed to provide all the information.

cpgeeksadgitm commented 1 year ago

@18o3 Please see this https://github.com/cp-geeks-adgitm/Hacktoberfest/pull/253/commits/7d5053fac4a0382d547268f0c7be4bc33a7a04e6 pr. It adds driver code like stack.push(2) means it doesn't require any runtime input from the user and provides output and placed under correct folder directory

18o3 commented 1 year ago

So worked on your feedback. Added driver code so that no input is required. The problem link where the code can be tested is LINK. As for placing under correct directory, I am trying to place in the CSES solutions folder. Should I place anywhere else?

cpgeeksadgitm commented 1 year ago

Thanks for the cooperation. But make sure pls remove the input code, just comment it for further use.

Okay no need to change the input in others.

Happy Hacktoberfest