 Parallels have been drawn between the second series episode "Thanks  for the Memory" and the  _"Star Trek: The Next Generation" (1987)_ (qv) episode "Clues",  produced two years later. Both stories are based around the crew of  their respective ships waking to discover they are missing time and  set about recovering their memories 