Check out list stuff from train branch

This commit is contained in:
2021-09-05 14:59:31 +02:00
parent 3b6c546cd4
commit 1ff828c4c6
10 changed files with 828 additions and 0 deletions

View File

@ -0,0 +1,6 @@
package aud.exam.prep.list;
import aud.exam.prep.SequenceProcessor;
abstract class DoubleListItemProcessor<T> implements SequenceProcessor<T, DoubleListItem<T>> {
}

View File

@ -0,0 +1,194 @@
package aud.exam.prep.list;
import aud.exam.prep.Pair;
import java.util.Comparator;
public class IterativeDoubleListItemProcessor<T> extends DoubleListItemProcessor<T> {
@Override
public boolean find(DoubleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean findBinary(DoubleListItem<T> list, T t, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean override(DoubleListItem<T> list, T from, T to) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean overrideAll(DoubleListItem<T> list, T from, T to) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean overrideAt(DoubleListItem<T> list, T to, int index) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void insertInOrder(DoubleListItem<T> list, T t, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean remove(DoubleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean removeAll(DoubleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isAscending(DoubleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public T max(DoubleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public T secondMax(DoubleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isItemWiseLessOrEqual(DoubleListItem<T> a, DoubleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isItemWiseLess(DoubleListItem<T> a, DoubleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isLexSmaller(DoubleListItem<T> a, DoubleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void exchangePairs(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void rotateTriples(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void removeEverySecond(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void doubleAllKeys(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> rotateRight(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> rotateLeft(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void removeDuplicates(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> invert(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> clone(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> alternate(DoubleListItem<T> a, DoubleListItem<T> b) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> merge(DoubleListItem<T> a, DoubleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<DoubleListItem<T>, DoubleListItem<T>> divideAlternating(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<DoubleListItem<T>, DoubleListItem<T>> divideAlternatingByRuns(DoubleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<DoubleListItem<T>, DoubleListItem<T>> divideByPivot(DoubleListItem<T> list, T pivot, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean check(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> create(Iterable<T> iterable) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Iterable<T> iterate(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
}

View File

@ -0,0 +1,194 @@
package aud.exam.prep.list;
import aud.exam.prep.Pair;
import java.util.Comparator;
public class IterativeSingleListItemProcessor<T> extends SingleListItemProcessor<T> {
@Override
public boolean find(SingleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean findBinary(SingleListItem<T> list, T t, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean override(SingleListItem<T> list, T from, T to) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean overrideAll(SingleListItem<T> list, T from, T to) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean overrideAt(SingleListItem<T> list, T to, int index) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void insertInOrder(SingleListItem<T> list, T t, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean remove(SingleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean removeAll(SingleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isAscending(SingleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public T max(SingleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public T secondMax(SingleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isItemWiseLessOrEqual(SingleListItem<T> a, SingleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isItemWiseLess(SingleListItem<T> a, SingleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isLexSmaller(SingleListItem<T> a, SingleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void exchangePairs(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void rotateTriples(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void removeEverySecond(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void doubleAllKeys(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> rotateRight(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> rotateLeft(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void removeDuplicates(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> invert(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> clone(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> alternate(SingleListItem<T> a, SingleListItem<T> b) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> merge(SingleListItem<T> a, SingleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<SingleListItem<T>, SingleListItem<T>> divideAlternating(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<SingleListItem<T>, SingleListItem<T>> divideAlternatingByRuns(SingleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<SingleListItem<T>, SingleListItem<T>> divideByPivot(SingleListItem<T> list, T pivot, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean check(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> create(Iterable<T> iterable) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Iterable<T> iterate(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
}

View File

@ -0,0 +1,194 @@
package aud.exam.prep.list;
import aud.exam.prep.Pair;
import java.util.Comparator;
public class RecursiveDoubleListItemProcessor<T> extends DoubleListItemProcessor<T> {
@Override
public boolean find(DoubleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean findBinary(DoubleListItem<T> list, T t, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean override(DoubleListItem<T> list, T from, T to) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean overrideAll(DoubleListItem<T> list, T from, T to) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean overrideAt(DoubleListItem<T> list, T to, int index) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void insertInOrder(DoubleListItem<T> list, T t, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean remove(DoubleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean removeAll(DoubleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isAscending(DoubleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public T max(DoubleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public T secondMax(DoubleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isItemWiseLessOrEqual(DoubleListItem<T> a, DoubleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isItemWiseLess(DoubleListItem<T> a, DoubleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isLexSmaller(DoubleListItem<T> a, DoubleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void exchangePairs(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void rotateTriples(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void removeEverySecond(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void doubleAllKeys(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> rotateRight(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> rotateLeft(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void removeDuplicates(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> invert(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> clone(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> alternate(DoubleListItem<T> a, DoubleListItem<T> b) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> merge(DoubleListItem<T> a, DoubleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<DoubleListItem<T>, DoubleListItem<T>> divideAlternating(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<DoubleListItem<T>, DoubleListItem<T>> divideAlternatingByRuns(DoubleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<DoubleListItem<T>, DoubleListItem<T>> divideByPivot(DoubleListItem<T> list, T pivot, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean check(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public DoubleListItem<T> create(Iterable<T> iterable) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Iterable<T> iterate(DoubleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
}

View File

@ -0,0 +1,194 @@
package aud.exam.prep.list;
import aud.exam.prep.Pair;
import java.util.Comparator;
public class RecursiveSingleListItemProcessor<T> extends SingleListItemProcessor<T> {
@Override
public boolean find(SingleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean findBinary(SingleListItem<T> list, T t, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean override(SingleListItem<T> list, T from, T to) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean overrideAll(SingleListItem<T> list, T from, T to) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean overrideAt(SingleListItem<T> list, T to, int index) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void insertInOrder(SingleListItem<T> list, T t, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean remove(SingleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean removeAll(SingleListItem<T> list, T t) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isAscending(SingleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public T max(SingleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public T secondMax(SingleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isItemWiseLessOrEqual(SingleListItem<T> a, SingleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isItemWiseLess(SingleListItem<T> a, SingleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean isLexSmaller(SingleListItem<T> a, SingleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void exchangePairs(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void rotateTriples(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void removeEverySecond(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void doubleAllKeys(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> rotateRight(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> rotateLeft(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public void removeDuplicates(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> invert(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> clone(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> alternate(SingleListItem<T> a, SingleListItem<T> b) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> merge(SingleListItem<T> a, SingleListItem<T> b, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<SingleListItem<T>, SingleListItem<T>> divideAlternating(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<SingleListItem<T>, SingleListItem<T>> divideAlternatingByRuns(SingleListItem<T> list, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Pair<SingleListItem<T>, SingleListItem<T>> divideByPivot(SingleListItem<T> list, T pivot, Comparator<T> cmp) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public boolean check(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public SingleListItem<T> create(Iterable<T> iterable) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
@Override
public Iterable<T> iterate(SingleListItem<T> list) {
// TODO: Your training
throw new RuntimeException("unimplemented");
}
}

View File

@ -0,0 +1,6 @@
package aud.exam.prep.list;
import aud.exam.prep.SequenceProcessor;
abstract class SingleListItemProcessor<T> implements SequenceProcessor<T, SingleListItem<T>> {
}

View File

@ -0,0 +1,10 @@
package aud.exam.prep.list;
import aud.exam.prep.SequenceProcessorTest;
class IterativeDoubleListItemProcessorTest extends SequenceProcessorTest<DoubleListItem<Integer>> {
protected IterativeDoubleListItemProcessorTest() {
super(new IterativeDoubleListItemProcessor<>());
}
}

View File

@ -0,0 +1,10 @@
package aud.exam.prep.list;
import aud.exam.prep.SequenceProcessorTest;
class IterativeSingleListItemProcessorTest extends SequenceProcessorTest<SingleListItem<Integer>> {
protected IterativeSingleListItemProcessorTest() {
super(new IterativeSingleListItemProcessor<>());
}
}

View File

@ -0,0 +1,10 @@
package aud.exam.prep.list;
import aud.exam.prep.SequenceProcessorTest;
class RecursiveDoubleListItemProcessorTest extends SequenceProcessorTest<DoubleListItem<Integer>> {
protected RecursiveDoubleListItemProcessorTest() {
super(new RecursiveDoubleListItemProcessor<>());
}
}

View File

@ -0,0 +1,10 @@
package aud.exam.prep.list;
import aud.exam.prep.SequenceProcessorTest;
class RecursiveSingleListItemProcessorTest extends SequenceProcessorTest<SingleListItem<Integer>> {
protected RecursiveSingleListItemProcessorTest() {
super(new RecursiveSingleListItemProcessor<>());
}
}