Skip to content

Instantly share code, notes, and snippets.

@dejesus2010
dejesus2010 / RyanFBQuestion.java
Created October 29, 2014 03:19
RyanFBQuestion.java
import java.util.*;
public class Solution{
private static Scanner sc;
private static int[] inputList = new int[26];
private static int[] visited = new int[26]; // tells me if I've visited a character as well as its index to which stack it belongs to in the listOfStacks
private static List<Stack<Character>> listOfStacks = new ArrayList<Stack<Character>>();
private static int indexAfterLastStack = 1; // points to empty slot to insert a new stack
private static List<ArrayList<Character>> setOfLists = new ArrayList<ArrayList<Character>>();