๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.52K subscribers
5.56K photos
3 videos
95 files
9.7K links
๐ŸšฉMain Group - @SuperExams
๐Ÿ“Job Updates - @FresherEarth

๐Ÿ”ฐAuthentic Coding Solutions(with Outputs)
โš ๏ธDaily Job Updates
โš ๏ธHackathon Updates & Solutions

Buy ads: https://telega.io/c/cs_algo
Download Telegram
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
public static int minsteps(List<Integer> cityMap, int rows, int cols, int maxsteps) {
        int[][] grid = new int[rows][cols];
        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < cols; j++) {
                grid[i][j] = cityMap.get(i * cols + j);
            }
        }
        int[][] dp = new int[rows][cols];
        for (int[] row : dp) {
            Arrays.fill(row, Integer.MAX_VALUE);
        }
        dp[0][0] = 0;

        int[] dx = {-1, 1, 0, 0};
        int[] dy = {0, 0, -1, 1};

        for (int steps = 0; steps <= maxsteps; steps++) {
            for (int i = 0; i < rows; i++) {
                for (int j = 0; j < cols; j++) {
                    if (dp[i][j] == Integer.MAX_VALUE) continue;

                    for (int k = 0; k < 4; k++) {
                        int ni = i + dx[k];
                        int nj = j + dy[k];
                        if (ni >= 0 && ni < rows && nj >= 0 && nj < cols && grid[ni][nj] == 0) {
                            dp[ni][nj] = Math.min(dp[ni][nj], dp[i][j] + 1);
                        }
                    }
                }
            }
        }

        if (dp[rows - 1][cols - 1] == Integer.MAX_VALUE) {
            return -1;
        } else {
            return dp[rows - 1][cols - 1];
        }
    }

Urban Navigator โœ…
Opening for Analyst at WIPRO Gurgaon.
Candidates with an experience range of 0 - 1 yr. Only, comfortable with US shifts, can send their CV's to shubhangi.mishra@wipro.com with the below details.

Role- Analyst
Should be flexible working in Shifts.
Experience- 0 yrs. to 1 yrs.
Qualification- MBA/M.com/ B.com/BBA.
Location- Gurgaon (Work From Office Only)
Looking for Immediate Joiners