codezonediitj / pydatastructs

A python package for data structures and algorithms
https://pydatastructs.readthedocs.io/en/stable/
Other
202 stars 270 forks source link

Wave Sort #396

Closed U-c0de closed 3 years ago

U-c0de commented 3 years ago

Description of the problem

If there are multiple sorted orders in wave form, return the one which is lexicographically smallest. The array may contain duplicates.

Example of the problem

Input: arr[] = {2, 4, 6, 8, 10, 20} Output: arr[] = {4, 2, 8, 6, 20, 10} OR any other array that is in wave form

@czgdp1807 Assign me this issue

Smit-create commented 3 years ago

This is not useful. Look at #343