Which type of exercise machine can you use if you have cartilage and ligament knee problem?

Limited. Do not use the quad extension machine. The only machine to use would be the supine leg press machine. You can do exercises without machines that would be safer.
Stationary Bike. Best machines would allow for knee motion without significant load on the knee. That would be something like a stationary bike set to low resistance. Pool exercises are also good.