Thanks for the reply guys, highly appreciated! On some situations, the algorithm provided doesn't return values for #secondLargestName at all. When it happens, #secondLargestNumber returns 0. Those two missing values are required for future usage. Attached a GIF (mouse hover gives you video controls such as pause): https://i.gyazo.com/ab7d77185cbadf97a2fd0d1ea0adece6.mp4 I tried to come up with a solution but couldn't figure it out, still new at this.