emory-courses / dsa-java

Data Structures and Algorithms in Java
https://emory.gitbook.io/dsa-java/
42 stars 55 forks source link

[HW2] getCandidate and pickCandidate #139

Closed Hodsonj closed 4 years ago

Hodsonj commented 4 years ago

I have a question about how getCandidate and pickCandidate work together. Let's say I use:

candidates = getCandidate("sh") pickCandidate("sh", "shack")

The pickCandidate should save shack but the variable candidates shouldn't change to have shack as the first element until I call:

candidates = getCandidate("sh") again.

is this interpretation of how they operate correct?

marvinquiet commented 4 years ago

We need to consult Dr. Choi and come back to you later.