string bread
list of string beard, graeg, rbaed, sgtgs
-
The program takes a string as an input. The string must not be an empty string input: "" output: "Enter non-empty value"
-
The program counts the length x of the string input: chan output: 4
-
The program splits the input string into an array input: "chan", output: ['c','h','a','n']
-
The program sorts the char array by alphabetical order input: ['c','h','a','n'] output: ['a','c','h','n']
-
The program takes a string of length x and make a list
-
The program takes the first element of the list and split it into an array
-
The program sorts the char array by alphabetical order
-
The program compares the input string and the first element of the list
-
The program returns true if the string and the element are the same
-
The program returns false if the string and the element are not the same