Ascending Order String Handling

Given a string for eg: MICROSOFT, How can you arrange each letter in this string in an ascending order?

  
Showing Answers 1 - 3 of 3 Answers

Kalyan

  • Mar 20th, 2018
 

In EBCDIC A- C1 , B - C2....Z- E9.
Perform varying inx from 1 by 1 until ws-data >= 9

If not-first-time
If ws-h < ws-data(inx:1)
Move ws-h to ws-o(inx-1:1)
Else
Move ws-data(inx:1) to ws-o(inx-1:1)
Endif
Else
Set not-first-time to true
Endif
Move ws-data(inx:1) to ws-h


  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions