Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69090

Sorting Clothing Items in Ascending Order

$
0
0

Hi everyone,

I’m working on a project where I need to sort an array of clothing items in ascending order based on a specific sequence. I have three types of clothing items: shoes, pants, and shirt. I want to arrange them in the following order: shoes, pants, and then shirt.

For example:

- Given the 1D string array: pants, shoes, shirt
The output should be: shoes, pants, shirt

- Given the array: pants, pants, shirt, shoes
The output should be: shoes, pants, pants, shirt

- Given the array: shoes, pants, pants, shirt, shoes
The output should be: shoes, shoes, pants, pants, shirt

I’m looking for a way to sort the array such that the items are ordered according to the specified sequence.

thank you!


Viewing all articles
Browse latest Browse all 69090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>