What is the SciFi story where a guy has to traverse a deadly alien 'trap' (it says in the story that it's possibly a trap or a puzzle but the tech is so advanced that they can't understand it) where the man dies a usually grisly death but is reanimated to test it again and again, each time getting a little further into the maze?
You might be referring to Rogue Moon, a short science fiction novel by Algis Budrys, about an artefact found on the Moon, that kills explorers in imaginative and grisly ways.
The problem with the death of the explorers is overcome by creating a copy of an explorer (done by teleporting the man to the Moon while at the same time teleporting another copy to an Earth-based receiver and keeping him in sensory deprivation), which explores the Moon, while the Earth-copy experiences everything the Moon-copy experiences.
This way, he has the memory of the latest experiences (including the death) of the previous explorer, which is used to penetrate the artefact.
Remove the aliens, and you have a fair description of "The Day Before Forever" by Keith Laumer.
Steve Dravek awakens in a strange place with hazy memories just a few days before his one-hundred-and-sixty-second birthday. He quickly learns that he has been frozen for quite some time by Eternity, Incorporated (ETORP) which effectively controls society in this brave new world of 2103.
Slowly his memories return. Turns out his old workplace is now an ETORP preserve. In typical Laumer-hero fashion, he stages a clandestine attack on the facility, finding his old office -- and more clues, including some which appear to have been written by a previous version of himself! Each incarnation of Steve Dravek gets further in their investigation. Will he ever reach the end? Stay tuned. :-)
This story is available in the collection "Future Imperfect", the cover of which is based on a scene in the story. This collection was published by Baen and is available on one of the Baen Free Library CDs which means you can find it online if you look hard enough. Enjoy!
"All you need is Kill" is a graphic novel which tells the story of soldier who has to figure out how to cross the united states to find the alien invaders' core. Each time he fails, he dies and then he is re-incarnated (actually travels back in time) with the knowledge he learned from previous attempts.
The graphic novel is cited as the story which inspired the movie "The Edge of Tomorrow."
This idea also appears in "Ender's Game" where the main character ("Ender") controls a video game character which, as part of exploring the video game world, has to guess which drink will avoid death; but both drinks end up in a grisly death.
There is an episode of Doctor Who (2005) whose plot basically boils down to this.
(synopsis redacted for brevity's sake)
The Doctor is locked in a castle [..] Inside is a wall of Azbantium, a mineral 400 times harder than diamond. [..] The revitalized Doctor starts punching at the wall until the Veil touches him, burning him and disabling his regeneration process. The Doctor uses the last of his energy to restart the teleportation chamber, aware that due to the resetting rooms, the system will still contain a copy of himself. He then falls to the ground, writes "bird" in the dust, and disintegrates. A new Doctor appears, starting the cycle anew.
Eventually after four billion years, the Doctor has finally broken through the Azbantium [..] A young boy approaches and the Doctor tells him to let the Time Lords know that he has returned, having "taken the long way around".