Yes it's feasible; I've done solo adventures in three editions
How feasible is it to play D&D with one DM and one player?
I'm more interested in 5e, because if I were going to attempt it, I'd
attempt in that edition. I am interested in past editions mainly just
to satisfy curiosity
Solo Adventures in D&D 5e
I have done this in 5e. You can find a text record of one such adventure in the Back Room chat here at RPG.SE with @Shalvenay and myself, starting roughly here. I recall that we did three sessions, but it might have been more.
My character's name is Malik Mabir, half elf, paladin. He had to discover through interactions with various NPC's (1) what the mystery / quest was, (2) what the McGuffin was, (3) who he needed to work with to return it to its rightful place, and (4) how to get out of a few sticky situations that turned into combat rather before he'd have preferred to. There was some combat, a bit of exploration and significant measure of Role Playing. There was a chase/pursuit scene as well.
- Chase/pursuit scenes are one of the bread and butter encounters to
have for solo D&D, in my experience.
@Shalvenay also DM'd a solo adventure with Sora Tamashii in the RPG.SE back room. They did quite a few sessions. Reading through those two different adventures (Sora's was IIRC far more social/RP heavy than mine was) you can see a way to do a solo adventure. It's not the only way, but I found the adventure that I did with @Shalvenay to be a lot of fun.
FWIW: other input on solo 5e is here
Running solo adventures in AD&D 1e
I ran and played solo adventures in AD&D 1e with a friend in college circa 1978, on the weekends when we were stuck there. It happened with some frequency, we were always short of funds. We'd trade off exploring one another's worlds: his was a homebrew AD&D 1e / Chivalry and Sorcery hybrid, but the game play was AD&D 1e at its core. Mine was mostly Old D&D (three books + Greyhawk + Eldritch Wizardry) because it's what I had built to date. In those editions, when 1 GP = 1 XP, it was very beneficial to try and complete an adventure / quest / treasure hunt with less combat, not more. The payoff of treasure and XP (and thus levels) was only rewarded if one survived the quest and thus got "there and back again" to enjoy the rewards.
Fun fact: it was even feasible to play by one's self in a random dungeon by using the AD&D 1e Dungeon Masters Guide's "Random Dungeon Generation For Solo Play" (page 173). The two of us tried that a couple of times with two players versus the random dungeon. shrug Not awesome, but doable. I did it once solo. The PC died rather early in the adventure so I abandoned that pursuit. (Don't look at me like that: we didn't have MTV!)
Running solo adventures in D&D Original (three books in a box)
I did a few solo adventures as DM when I was trying to design beginner adventures in the late 1970's, playing with my brother as the adventurer. As it worked out, the one we ran for the longest that I later submitted (as a solo adventure) to TSR in the early 1980's did not make the cut. (It was not published. Such is life).
Of possibly greater interest: Rob Kuntz (you'll see his name on the OD&D Greyhawk Supplement) ran solo adventures with Gary Gygax with some frequency in the early stages of the game's history (early-to-mid 1970's). You'll see a few of his reminiscences at his web site if you are interested. His Fighting Man Robilar has a variety of tales and legends attached to him within the old school D&D gaming community. Robilar is one of the few PCs who survived the original Tomb of Horrors adventure. There is a Q&A about that here at RPG.SE.
What does a solo adventure look like?
One character using his or her wits, sometimes with an NPC or two who have been convinced via role-play (or hired) to accompany the PC on parts of the adventure. In my experience, the player is truly solo a little over half the time, and the other half of the time various NPCs are allies or hirees. The DM will need to consider that in designing the solo challenges for the player. Some of the adventure should be pure solo, but all of it need not be. (IMO, the 5e Rogue can go solo heavy, approaching pure solo, based on the class features available).
Most of the adventure scenes are not combat brawls, but include a varied combination of exploration, trap detection and avoidance, knowing when to fight and when to flee, puzzle / problem solving, and lots of role playing to find out necessary information which usually includes who to trust and who not to trust, and how to get to the McGuffin or quest object at the end.
What does a solo adventure "feel like"?
Our RPGSE friend @BlackSpike makes this very valid point: one-on-one games are very intimate. Very customised. The GM is not trying to balance a group of players. It's all about The One! True for D&D, and also true for other RPG's.
For this edition, WoTC publised an Unearthed Arcana for Sidekicks that makes for an easy-to-insert support character for when your PC needs or wants one. I'd recommend it to any DM. I've used it to insert NPC's in my current campaign. With the release of Tasha's Cauldron of Everything, the Sidekick rules went from play test to published. (There were also Sidekicks in D&D Essentials for 5e).
A rough power estimation for encounters
As a very rough rule of thumb, I have found that if I have a level 3 character versus a CR 1 monster/NPC, that's close to balanced but it really depends on the PC and the NPC. Starting out, I'd recommend CR to be 1/4th of character level until you find your sweet spot for combat encounters. This math is very much not precise.
Using the knock out rule in 5e
As a DM, one of this edition's quirks that gives you a lot of latitude in keeping the PC alive (if you so desire) is this rule:
Knocking a Creature Out
Sometimes an attacker wants to incapacitate a foe, rather than deal a killing blow. When an attacker reduces a creature to 0 hit points with a melee attack, the attacker can knock the creature out. The attacker can make this choice the instant the damage is dealt. The creature falls unconscious and is stable. (Basic Rules p. 79, same text in PHB)
This gives the DM the chance, when the dice are cold or the PC took on a fight that was too much for them, to knock the PC out and have them captured rather than killed. (And the next adventure becomes: how does the PC escape, or talk their way out of captivity)?
In the solo adventure that @Shalvenay ran for me, he used that rule to handle my paladin being knocked to 0 HP during a formal duel.