List<String> strings; // contains "foo", "bar", "baz", "xyz"
and if given an input "baz" the function re-arrange(String input) should return the strings
"baz", "foo", "bar", "xyz"
and if given an input "bar" the function re-arrange(String input) should return the strings
"bar", "foo", "baz", "xyz"
1 Answer