MCPcopy Index your code
hub / github.com/careercup/ctci / sort

Method sort

java/Chapter 1/Question1_3/Question.java:4–8  ·  view source on GitHub ↗
(String s)

Source from the content-addressed store, hash-verified

2
3public class Question {
4 public static String sort(String s) {
5 char[] content = s.toCharArray();
6 java.util.Arrays.sort(content);
7 return new String(content);
8 }
9
10 public static boolean permutation(String s, String t) {
11 return sort(s).equals(sort(t));

Callers 7

permutationMethod · 0.95
printLongestWordMethod · 0.45
rankBMethod · 0.45
isUniqueMethod · 0.45
printPairSumsMethod · 0.45
validateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected