Problem #PRU-31368

Problems Set theory and logic Order relations

Problem

The numbers from 1 to 9999 are written out in a row. How can I remove 100 digits from this row so that the remaining number is a) maximal b) minimal?