Search
⌘K

Leetcode 3332. Maximum Points Tourist Can Earn

Choose a starting city and sequence of k daily actions (stay to earn stayScore[day][city] or move to any other city to earn travelScore[from][to]) to maximize total points across n fully-connected cities. This is solved with dynamic programming over days and cities, taking the max over previous-city transitions (O(k·n^2), feasible for n,k ≤ 200).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.