Let us discuss the various implementations of theFIBONACCIBUTTSORT.
Name:
Anonymous2009-08-17 20:23
Hello, /prog/, How are you this fine, fine evening? I'll just leave this here...
import java.io.IOException;
import java.util.*;
class Tag
{
private static Random generator = new Random(new Date().getTime());
private static Tag[] tags = new Tag[]
{
new Tag("b"), new Tag("i"), new Tag("u"), new Tag("o"),
};
private String name;
static Tag getRandomTag()
{
return tags[generator.nextInt(tags.length)];
}
private Tag(String name)
{
this.name = name;
}
public String getOpenForm()
{
return "[" + name + "]";
}
public String getClosedForm()
{
return "[/" + name + "]";
}
}
public class Progifier
{
public static void main(String[] args) throws IOException
{
Stack<Tag> tags = new Stack<Tag>();
Random generator = new Random(new Date().getTime());
while(System.in.available() > 0)
{
int b = System.in.read();