By using an algorithm of problem solving steps, Stuart was able to find the correct key. When a person uses an algorithm they can get a solution to the problem they are facing. A person will use step-by-step procedures to get the right answer. Many people think the word "algorithm" is only used in a math problem, but it's used in psychology also.
Using an algorithm in problem solving can take more time than making an immediate decision. Another option is to use a heuristic which when people make fast decisions based on their judgment and expertise.
Explanation: Counting them as part of the population would greatly increase the South's political power, but it would also mean paying higher taxes. This was a price the Southern states were willing to pay. They argued in favor of counting slaves. Northern states disagreed.