There were three questions in the coding test which was on the Hackerrank platform. The first question was straightforward. The second one was also easy and had to count the votes for each name and tell which person had the highest votes. The third question was a good one. In this question, we were given a tree, and we were to find the number of prime numbers in a given subtree rooted at a particular node.
Sigiloso
I was able to solve all the three questions. Third question can be done using DFS.