#81039buildRepresentationForNode function doesn't scale.
Description
The code in buildRepresentationForNode doesn’t scale since it sorts the entire list after each append.
The code in buildRepresentationForNode doesn’t scale since it sorts the entire list after each append.