My Microsoft online assessment had two coding problems. The first was a House Robber–style variant with a number-theory twist: besides stepping to the next city, you can jump ahead by any prime number that ends in 3. The second was LeetCode 2560, House Robber IV.
Interview Details
Problem 1 — Maximum Money on a Prime-Jump Journey
A traveler goes through a row of cities given as an integer array. Each value is the money earned in that city (positive) or spent there (negative). The trip starts at city 0 and has to end at city n - 1. From any city, the traveler can either move to the next city or jump ahead p cities, where p is any prime number whose last digit is 3. The task is to return the most money the traveler can have at the end of the trip.