// Path: src/main/java/org/jsuffixarrays/Tools.java
// static final void assertAlways(boolean condition, String msg)
// {
//     if (!condition)
//     {
//         throw new AssertionError(msg);
//     }
// }


import static org.jsuffixarrays.Tools.assertAlways;
import java.util.Arrays;

        
        return tab;
    }

    /**
     * {@inheritDoc}
     * <p>
     * Additional constraints enforced by Karkkainen-Sanders algorithm:
     * <ul>
     * <li>non-negative (>0) symbols in the input (because of radix sort)</li>,
     * <li><code>input.length</code> &gt;= <code>start + length + 3</code> (to simplify
     * border cases)</li>
     * <li>length >= 2</li>
     * </ul>
     * <p>
     * If the input contains zero or negative values, or has no extra trailing cells,
     * adapters can be used in the following way:
     * 
     * <pre>
     * return new {@link DensePositiveDecorator}(
     *      new {@link ExtraTrailingCellsDecorator}(
     *          new {@link Skew}(), 3));
     * </pre>
     * 
     * @see ExtraTrailingCellsDecorator
     * @see DensePositiveDecorator
     */
    @Override
    public int [] buildSuffixArray(int [] input, int start, int length)
    {

// Path: src/main/java/org/jsuffixarrays/Tools.java
// static final void assertAlways(boolean condition, String msg)
// {
//     if (!condition)
//     {
//         throw new AssertionError(msg);
//     }
// }


// Path: src/main/java/org/jsuffixarrays/Skew.java
import static org.jsuffixarrays.Tools.assertAlways;
import java.util.Arrays;

        
        return tab;
    }

    /**
     * {@inheritDoc}
     * <p>
     * Additional constraints enforced by Karkkainen-Sanders algorithm:
     * <ul>
     * <li>non-negative (>0) symbols in the input (because of radix sort)</li>,
     * <li><code>input.length</code> &gt;= <code>start + length + 3</code> (to simplify
     * border cases)</li>
     * <li>length >= 2</li>
     * </ul>
     * <p>
     * If the input contains zero or negative values, or has no extra trailing cells,
     * adapters can be used in the following way:
     * 
     * <pre>
     * return new {@link DensePositiveDecorator}(
     *      new {@link ExtraTrailingCellsDecorator}(
     *          new {@link Skew}(), 3));
     * </pre>
     * 
     * @see ExtraTrailingCellsDecorator
     * @see DensePositiveDecorator
     */
    @Override
    public int [] buildSuffixArray(int [] input, int start, int length)
    {

        assertAlways(input != null, "input must not be null");
