public int lengthOfLIS(int[] nums) {
		if (nums == null || nums.length == 0) {
			return 0;
		}
		
		int dp[] = new int[nums.length];
		Arrays.fill(dp, 1);
		
		int longest = 1;
		
		for (int i = 1; i < nums.length; i++) {
			for (int j = 0; j < i; j++) {
				if (nums[j] < nums[i] && dp[j] + 1 > dp[i]) {
					dp[i] = dp[j] + 1;
				}
			}
			
			if (dp[i] > longest) {
				longest = dp[i];
			}
		}
		
		
		return longest;
    }