I need help in this problem...

Suppose an automobile's odometer can represent mileage up to 999,999 and that leading 0's are not shown. For example, 2511 miles would not be shown as 002511.

How many mileage readings from 1 to 999,999 are palindromes?

What's the smallest difference between two consecutive odometer palindromes of 6 digits?

Thanks a lot!

Regards,

vedic