@@ -0,0 +1,1694 @@
+package com.fishercoder.solutions;%0A%0A/**%0A * 673. Number of Longest Increasing Subsequence%0A * Given an unsorted array of integers, find the number of longest increasing subsequence.%0A%0A Example 1:%0A%0A Input: %5B1,3,5,4,7%5D%0A Output: 2%0A Explanation: The two longest increasing subsequence are %5B1, 3, 4, 7%5D and %5B1, 3, 5, 7%5D.%0A%0A Example 2:%0A%0A Input: %5B2,2,2,2,2%5D%0A Output: 5%0A Explanation: The length of longest continuous increasing subsequence is 1,%0A and there are 5 subsequences' length is 1, so output 5.%0A%0A Note: Length of the given array will be not exceed 2000 and the answer is guaranteed to be fit in 32-bit signed int.%0A */%0Apublic class _673 %7B%0A    public static class Solution1 %7B%0A        public int findNumberOfLIS(int%5B%5D nums) %7B%0A            int longest = findLongestLIS(nums);%0A            if (longest == 1) %7B%0A                return nums.length;%0A            %7D%0A            int result = 0;%0A            for (int i = 0; i %3C nums.length; i++) %7B%0A                if (i + longest %3E nums.length) %7B%0A                    break;%0A                %7D%0A            %7D%0A            return result;%0A        %7D%0A%0A        private int findLongestLIS(int%5B%5D nums) %7B%0A            int longest = 0;%0A            for (int i = 0; i %3C nums.length; i++) %7B%0A                int len = 1;%0A                int lastNum = nums%5Bi%5D;%0A                for (int j = i+1; j %3C nums.length; j++) %7B%0A                    if (lastNum %3C nums%5Bj%5D) %7B%0A                        len++;%0A                        lastNum = nums%5Bj%5D;%0A                        continue;%0A                    %7D else %7B%0A                        break;%0A                    %7D%0A                %7D%0A                longest = Math.max(longest, len);%0A            %7D%0A            return longest;%0A        %7D%0A    %7D%0A%7D%0A

check in not finished 673 for now