In game theory, the traveler's dilemma (abbreviated TD) is a type of non-zero-sum game in which two players attempt to maximize their own payoff, without any concern for the other player's payoff. We have presented the code and applications for Traveler's dilemma in O(1) time complexity.