Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update simple_linked_list_test.go with an idempotency test
If the submitter changes the actual list while iterating through its elements, the existing tests won't catch that. Example of a String() method that changes the underlying list: func (l *List) String() string { var listString string for l.head != nil { listString += fmt.Sprintf("%d ", l.head.value) l.head = l.head.next } return listString }
- Loading branch information