Amazon interview question

How to deal with difficult condition?