Complex sentence: This is due to the use of self-reference, where the list is used as both the queue and the result.
Split into simpler sentences: This is due to the use of self-reference. The list serves a dual purpose as both the queue and the result.