๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
#include <iostream>
#include <vector>
#include <map>
using namespace std;
void findPerm(vector<int>& nums) {
    int N = nums.size();
    map<int, int> hashmap;

    for (int num : nums) {
        if (num >= 1 && num <= N) {
            hashmap[num]++;
        } else {
            hashmap[num] = 1e9;
        }
    }

    vector<int> missing;
    for (int num = N; num >= 1; num--) {
        if (!hashmap.count(num)) {
            missing.push_back(num);
        }
    }

    for (int& num : nums) {
        if(missing.size()==0) break;
        if (--hashmap[num] > 0) {
            num = missing.back();
            missing.pop_back();
        }
        hashmap[num]--;
    }
}

DE Shaw โœ…
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int minimizeMismatchScore(string& s1, string& s2, int x, int y) {
    int m = s1.size();
    int n = s2.size();
    vector<vector<int>> dp(m + 1, vector<int>(n + 1, 0));
   
    for (int i = 1; i <= m; ++i) {
        dp[i][0] = i * x;
    }
    for (int j = 1; j <= n; ++j) {
        dp[0][j] = j * x;
    }
   
    for (int i = 1; i <= m; ++i) {
        for (int j = 1; j <= n; ++j) {
            if (s1[i - 1] == s2[j - 1]) {
                dp[i][j] = dp[i - 1][j - 1];
            } else {
                dp[i][j] = min({ dp[i - 1][j] + x, dp[i][j - 1] + x, dp[i - 1][j - 1] + y });
            }
        }
    }
   
    return dp[m][n];
}

  DE Shaw โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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