public static String[] longestCommonSubsequence(String x, String y){
		x = '$'+x;
		y = '$'+y;
		int[][] b = new int[x.length()][y.length()];
		short[][] arrowTable = new short[x.length()][y.length()];
		for(int i=1;i<x.length();i++){
			arrowTable[i][0] |= (1<<UP);
		}
		for(int i=1;i<y.length();i++){
			arrowTable[0][i] |= (1<<LEFT);
		}
		for(int i=1;i<x.length();i++){
			for(int j=1;j<y.length();j++){
				
				if(b[i-1][j]<b[i][j-1]){
					arrowTable[i][j] |= (1<<LEFT); 
					b[i][j] = b[i][j-1];
				}
				else if(b[i-1][j]>b[i][j-1]){
					arrowTable[i][j] |= (1<<UP); 
					b[i][j] = b[i-1][j];
				}else{
					arrowTable[i][j] |= (1<<LEFT);
					arrowTable[i][j] |= (1<<UP);
					b[i][j] = b[i-1][j];
				}
					
				if(x.charAt(i)==y.charAt(j)){
					if(b[i-1][j-1]+1>b[i][j]){
						arrowTable[i][j] = (short)(0|(1<<DIAGNAL));
						b[i][j]=b[i-1][j-1]+1;
					}else if(b[i-1][j-1]+1==b[i][j]){
						arrowTable[i][j] |= (1<<DIAGNAL);
					}
						
				}
			}
		}
		return LCSTraceBack(x,y, arrowTable,x.length()-1,y.length()-1, b[x.length()-1][y.length()-1]);	
	}