Challenge #2: Lexicographic Sorting
Summary: Write a function to sort an array of strings based on an arbitrary lexicographic ordering. The function will take two parameters: an array of strings to sort and a string specifying the lexicographic order.
Example input #1: ( ["acb", "abc", "bca"], "abc") Example output #1: ["abc","acb","bca"]
Example input #2: ( ["acb", "abc", "bca"], "cba") Example output #2: ["bca", "acb", "abc"]
Example input #3: (["aaa","aa",""], "a") Example output #3: ["", "aa", "aaa"]
You may assume that the strings to be sorted consist only of characters from the specified lexicographical ordering. You may also assume that the characters in the strings to sort consist only of lowercase a-z.
Deliverables: A link to a Github repo with the source of your project. Thorough commenting of the code isn't necessary, but you will have to explain it in detail to us. In addition, please provide a brief runtime analysis of your solution.