Initial screening followed by technical round. Was asked Longest Increasing Subsequence and the following:
Two towns, Town A and Town B, are 1,000 miles apart. You are in Town A, you have 3,000 apples, and you have a truck that can hold 1,000 apples. Your job is to transport the apples to Town B; however, for every mile you travel toward Town B from Town A, you must pay a tax of 1 apple. The tax must be paid immediately after every mile you travel toward Town B (i.e. it isn't collected at the end of your progress toward B). You aren't charged for travelling back toward Town A. What is the maximum number of apples you can get to Town B?