public static long[] findKUglyNums(int k) {
		int idx2 = 0; //store the last index whose value multipy 2 is bigger than the biggest ugly number in array
		int idx3 = 0; //store the last index whose value multipy 3 is bigger than the biggest ugly number in array
		int idx5 = 0; //store the last index whose value multipy 5 is bigger than the biggest ugly number in array
		long[] uglyNums = new long[k];
		int currIdx = 0;
		uglyNums[0] = 1;
		
		while(currIdx+1 < k) {
			long currMin = (uglyNums[idx2]*2 < uglyNums[idx3]*3)? uglyNums[idx2]*2:uglyNums[idx3]*3;
			currMin = (currMin<uglyNums[idx5]*5)?currMin:uglyNums[idx5]*5;
			uglyNums[++currIdx] = currMin;
			
			while(uglyNums[idx2]*2<=currMin) {idx2++;}
			while(uglyNums[idx3]*3<=currMin) {idx3++;}
			while(uglyNums[idx5]*5<=currMin) {idx5++;}
		}
		
		// System.out.println(Arrays.toString(uglyNums));
		return uglyNums;
	}