Is this sentence correct? Future perfect

Solution 1:

Yes, you can use the word cleaning. Here's why. Diagram the sentence this way:

Subject | verb | direct object | adverb phrase.

I | will have finished | cleaning the room | by the time you come.

Cleaning the room is the direct object, which in this case is a gerund phrase, a verb acting as a noun and its objects. Think of it like this: I will have finished what? The answer is direct object (cleaning the room), modified by the adverb phrase (by the time you come).