finding the most occurrences in a stack
<p>I am new to programming, so please accept my apologies if this question is simple.</p>

<p>My teacher wants us to create a method that searches a stack for the name that occurs most often and returns it</p>

<p>for example : If I have these names in my stack: </p>

<p>Tiger Woods, Jack Nicholas, Arnold Palmer, Jack Nicholas, Jimmy Demerrit, Jack Nicholas, Sam Sneed, Jimmy Demerrit, Ben Hogan, Walter Hagen, Tommy Armor, Bobby Jones</p>

<p>the method should return Jack Nicholas</p>

<p>Please help me for I need to know how to do it for my program</p>

<p>thank you in advance</p>
