title | date | draft | tags | ||||
---|---|---|---|---|---|---|---|
Algorithm4 Java Solution 2.2.01 |
2019-10-08 01:57:49 +0800 |
false |
|
Give a trace, in the style of the trace given at the beginning of this section, showing how the keys A E Q S U Y E I N O S T are merged with the abstract in-place merge() method.
code:
/Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home/bin/java -javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=50285:/Applications/IntelliJ IDEA CE.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/gdhu/projects/Algorithms4/out/production/Algorithms4:/Users/gdhu/projects/Algorithms4/lib/hamcrest-core-1.3.jar:/Users/gdhu/projects/Algorithms4/lib/junit-4.8.jar:/Users/gdhu/projects/Algorithms4/lib/gson-2.8.2.jar:/Users/gdhu/projects/Algorithms4/lib/guava-29.0-jre.jar Ch_2_2.Ex_2_2_01
input: k A E Q S U Y E I N O S T i j
0 A 0 6 | A E Q S U Y E I N O S T
1 A E 1 6 | E Q S U Y E I N O S T
2 A E Q 1 7 | E Q S U Y I N O S T
3 A E E S 2 7 | Q S U Y I N O S T
4 A E E I U 2 8 | Q S U Y N O S T
5 A E E I N Y 2 9 | Q S U Y O S T
6 A E E I N O E 2 10 | Q S U Y S T
7 A E E I N O Q I 3 10 | S U Y S T
8 A E E I N O Q S N 3 11 | S U Y T
9 A E E I N O Q S S O 4 11 | U Y T
10 A E E I N O Q S S T S 4 12 | U Y
11 A E E I N O Q S S T U T 5 12 | Y
Answer is: A E E I N O Q S S T U Y
Process finished with exit code 0