public final class LabsSolutionPrinter
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
LabsSolutionPrinter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
exactStringRepresentation(boolean[] sequence)
Returns a traditional string representation of a binary sequence, e.g.
|
static java.lang.String |
runLengthFormatRepresentation(boolean[] sequence)
Returns a run length format representation of a binary sequence, e.g.
|
public static java.lang.String exactStringRepresentation(boolean[] sequence)
Returns a traditional string representation of a binary sequence, e.g. [ +1, +1, -1, +1, -1, -1]
sequence
- the sequencepublic static java.lang.String runLengthFormatRepresentation(boolean[] sequence)
Returns a run length format representation of a binary sequence, e.g. [ + 2 1 1 2 ] for sequence [ +1, +1, -1, +1, -1, -1] or [ - 2 1 1 2 ] for [ -1, -1, +1, -1, +1, +1]. This notation is useful for comparing algorithm results with official results from the Internet.
sequence
- the sequence