package com.coding.basic.queue;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import com.coding.basic.stack.myselfQueue.QueueWithTwoStacks;
public class JosephusTest {
@Before
public void setUp() throws Exception {
}
@After
public void tearDown() throws Exception {
}
@Test
public void testExecute() {
Assert.assertEquals("[1, 3, 5, 0, 4, 2, 6]", Josephus.execute(7, 2).toString());
}
@Test
public void testTwoStackQueue(){
QueueWithTwoStacks<Integer> q = new QueueWithTwoStacks<Integer>();
q.enQueue(1);
q.enQueue(2);
q.enQueue(3);
q.enQueue(4);
System.out.println(q.deQueue());
System.out.println(q.deQueue());
System.out.println(q.deQueue());
System.out.println(q.deQueue());
}
}