1523

 

10310

 

763

 

1584

 

12820

 

12816

 

1583

 

1585

 

1062

WA Code:

 Idea The ships load in alphabetical order, so we can stack with respect to the alphabet. Start with one stack and add the first letter. From then on, check each stack to see if the current letter can be added. If the current letter is less than or equal to the one