In Missy Elliott's song Work It, she sings, "I put my thang down, flip it, and reverse it."
A lot of jokes have been made of these lyrics, including this classic xkcd: https://xkcd.com/153/
I recently saw this tweet, https://i.stack.imgur.com/mLq15.jpg , and began to wonder what data structures can be flipped AND reversed.
A linked list can be reversed, but can it be flipped?
A B tree could be 'flipped' in the sense that child nodes point to parent nodes instead of the other way around but I would probably describe this as 'inverted' not flipped.
I think an array could be flipped by swapping its indices and values. Could it then be reversed?
The written lyrics are:
I put my thang down, flip it and reverse it
Ti esrever dna ti pilf nwod gnaht ym tup i
This line is definitely reversed, but I don't think it's flipped. I think if the characters were upside down, then they would be both reversed AND flipped.
I'm looking for a serious answer as I hope this could lead to a fun interview question.