Cross your legs with the leg to be exercised underneath.
Use the top leg to resist the leg underneath as the knee straightens.
When the knee is straight, cross legs the other way around and with the underneath leg resist the top leg as the knee bends.