private static ArrayList<Integer> findLongestIncSubSequence(int[] sequence) {
		// TODO Auto-generated method stub
		int i,j;
		int[] subSeqLen = new int[sequence.length];
		int[] largestValueOfSubSeq = new int[sequence.length];
		int[] backPtr = new int[sequence.length];
		int largestLenSoFar;
		int largestLenSoFarIndex = -1;
		subSeqLen[0] = 1;
		largestValueOfSubSeq[0] = sequence[0];
		backPtr[0] = -1;
		for(i = 1;i < sequence.length;i++){
			largestLenSoFar = Integer.MIN_VALUE;
			for(j = 0;j < i;j++){
				if(sequence[i] > largestValueOfSubSeq[j]){
					if(subSeqLen[j] > largestLenSoFar){
						largestLenSoFar = subSeqLen[j];
						largestLenSoFarIndex = j;
					}
				}
			}
			if(largestLenSoFar == Integer.MIN_VALUE){
				subSeqLen[i] = 1;
				largestValueOfSubSeq[i] = sequence[i];
				backPtr[i] = -1;
			}
			else{
				subSeqLen[i] = largestLenSoFar + 1;
				largestValueOfSubSeq[i] = sequence[i];
				backPtr[i] = largestLenSoFarIndex;
			}
		}
		ArrayList<Integer> subSequence = new ArrayList<Integer>();
		i = sequence.length - 1;
		while(i >= 0 && backPtr[i] == -1){
			i--;
		}
		if(i == -1){
			subSequence.add(sequence[0]);
			return subSequence;
		}
		else{
			while(i != -1){
				subSequence.add(sequence[i]);
				i = backPtr[i];
			}
			return subSequence;
		}
	}