public static void LIS(Integer[] mArray){
		//This will implement the Longest Increasing Subsequence algorithm using
		//Dynamic Programming in O(n^2) time

		int[] sizes = new int[mArray.length];
		String[] paths = new String[mArray.length];

		//First we init both sizes and paths
		for(int i = 0; i < mArray.length; i++){
			sizes[i] = 1;
			paths[i] = mArray[i] + " ";
		}

		//Then we use dynamic programming to build subsequences
		for(int i = 1; i < mArray.length; i++){
			for(int j=0; j<i; j++){
				if(mArray[i] > mArray[j] && sizes[i] < sizes[j] + 1){
					sizes[i] = sizes[j] + 1;
					paths[i] = paths[j] + mArray[i] + " ";
				}
			}
		}

		//Finally we print the longest increasing subsequence
		int maxLength = 0, maxIndex = 0;
		for(int i=0; i<sizes.length; i++){
			if(maxLength < sizes[i]){
				maxLength = sizes[i];
				maxIndex = i;
			}
		}
		SOP("LIS: " + paths[maxIndex]);

	}