@davepl1968 I asked this question when interviewing candidates at Microsoft. I accepted any working answer, as long as they could explain the memory and time tradeoffs.
It amazed me how many people couldn’t form any answer from basic programming concepts.
@patrickc Square knot vs granny knot. My mother taught me the granny knot and that’s what my muscle memory wants to tie. I need to concentrate to tie the square knot.