Im supposed to use binary to add to the list and keep it in order. Im not sure if im doing it right, but I cant seem to get it to add to the list at all. Any help would be appreciated.
It could be better to do the operation in two steps:
1. Locate the insertion position.
2. Insert at that position.
As is, it remains unclear how the assignment operator on line 18 does an insertion. Intuitively, an assignment changes rather than adds. Besides, the value does not even change because of the condition on line 17.
Furthermore, there is nothing that looks like insertion, if the new value is novel.
Okay i see what i did and ive made some changes. Its still not adding to the list though. She wants the position returned for the google test she has set up or something like that