yes----- if there are no molded bends
generally the end has to higher that the dishwasher or the water will continually drain out
do not use a length that allows hose to lay on the floor as that will eventually get blocked with rubbish and not drain
The top of the dishwasher is supposed to be attached to the underside of the countertop to prevent this problem. Open the door, and look at the top/front of the inside, and see if there are screws there to attach to the underside of the countertop.