a sequence special consist positive number 0s follow positive number 1s positive number 2sfor example 012 001112 specialIn contrast 210 1 0120 specialgiven array num consist integer 0 1 2 return number different subsequence special since answer large return modulo 109 7a subsequence array sequence derive array delete element change order remain element two subsequence different set index choose different Example 1input num 0122output 3explanation the special subsequence bolde 0122 0122 0122example 2input num 2200output 0explanation there special subsequence 2200example 3input num 012012output 7explanation the special subsequence bolde 012012 012012 012012 012012 012012 012012 012012 Constraints1 numslength 1050 numsi 2