I have a little different logic in pattern 27 check if it is correct

import java.util.Scanner;

public class pattern14 {

public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int row = (2 * n) - 1;
	int nst = 1;
	int val = 1;
	int i = 1;
	while (i <= row) {

		for (int j = 1; j <= nst; j++) {
			if (j % 2 == 0) {
				System.out.print("*");
			} else {
				System.out.print(val);
			}
		}
		System.out.println();
		if (i <= row / 2) {
			nst = nst + 2;
			val++;
		} else {
			nst = nst - 2;
			val--;
		}
		i++;

	}
}

}

hey I have taken your doubt, can you please tell me the timestamp of the video where this pattern is being displayed?