Dassault Systèmes interview question

Sort array in the wave form