-
Notifications
You must be signed in to change notification settings - Fork 2
symmetricorder
bradendubois edited this page Nov 24, 2021
·
10 revisions
ID: symmetricorder
Difficulty: 1.6
CPU Time: 1 second
Memory: 1024 MB
To create the symmetric shape, we want to take every second name and store them for later, and then output those in reverse order they were stored. For this, we can use a stack, and simply push every second name we read in, and output the other ones, and then pop every name off the stack, outputting as we go.