The answer involved dividing the integer by successively smaller amounts, relying on the fact that integer division floors the quotient, to "grab" characters corresponding to the numbers starting from the left and going to the right. There had to be three cases, one in which the number was negative, one in which it was zero, and one in which it was positive. Leading zeros should not be added to string.

Given two robots on an infinite line of integers, with a flag guaranteed to be between them, write a behavior for both robots to follow which will guarantee them to eventually meet. The robots can only "see" the position they are standing on, and can't remember anything. Also note that they can't tell if they are the leftmost or rightmost robot. They can tell if they are on the flag or the other robot. They may move right, move left, or wait.

The answer involved moving both robots to the right (or left) until one of them encounters the flag, at which point it would increase its speed (move twice instead of moving then waiting) until it caught up with the other bot.

In short, an interface has only the name, parameters, and return types. An interface does not implement these in anyway. An abstract class can do everything an interface does and more, it can define what a method does. Interfaces do not consume the CPU as much as abstract classes because they are only the names for the members to be implemented while abstract classes may have some methods implemented.

I think you didn't take in consideration the fact that an int can be a negative number. For example in python sript len(str(abs(x))) would give you the result you wanted. Cause minus would give higher length.