Hi, everyone and I hope you are doing well!
Recently, I started to solve some graph problems like this:
I'm trying to figure out if I need to learn something to handle this kind of problems, so I will glad if you can share with me problems like that and some tricks, thank you!
What exactly, besides being on a graph, is the common underlying theme of your two problems? Right now it is kinda hard to understand what exactly you are asking.