I am struggling with the problem mentioned. I am fairly new to algorithms and such problem solving. My college professor gave me few problems to practice and it is one of th