๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.52K subscribers
5.56K photos
3 videos
95 files
9.69K 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
#include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define MAXN 100001
#define INF 1e18+1

int solve(int matrixsizes , vector&arr , int start , int end , int diceroll)
{

   matrixsizes = matrixsizes*matrixsizes;
   unordered_map<int , int>mp;
   for(int i = 0 ; i < arr.size() ; i+=2)
   {
       mp[arr[i]] = arr[i+1];
   }
  vector<int>visited(matrixsizes+1 ,0);
    queue<pair<int, int>>q;
    q.push({start , 0});
    while(!q.empty())
    {
        int step = q.front().second;
        int pos = q.front().first;
        q.pop();
        if(pos == end) return step;
        for(int k = 1 ; k<= diceroll ; k++)
        {
            int loc = pos+k;
            if(loc>matrixsizes) break;
           
            if(visited[loc] == 1)continue;
           
            visited[loc] = 1;
            if(mp.find(loc) != mp.end())
            {
                q.push({mp[loc] , step+1});
            }
            else q.push({loc , step+1});
        }
    }
    return -1;
}
int main(){

#ifndef ONTLINE_JUDGE

freopen("input.txt", "r", stdin);

freopen("output.txt", "w", stdout);
#endif

int m, diceroll;
cin>>m>>diceroll;

int n ;

cin>>n;
vector<int>nums;
for(int i = 0 ; i < n ; i++)
{
  int x , y;
  cin>>x>>y;
  nums.push_back(x);
  nums.push_back(y);
}
int s ,e;
cin>>s>>e;;
cout<<solve(m , nums , s , e ,diceroll);

return 0;
}

Cisco โœ…
vector<vector<vector<int>>> memo;
    int N;
    int dp(int r1, int c1, int c2, vector<vector<int>> &grid)
    {
        int r2 = r1+c1-c2;
        if(r1==N r2==Nc1==Nc2==Ngrid[r1][c1]==-1||grid[r2][c2]==-1)
            return INT_MIN;
        else if(r1==N-1 && c1==N-1)
            return grid[r1][c1];
        else if(memo[r1][c1][c2]!=INT_MIN)
            return memo[r1][c1][c2];
        else
        {
            int ans = grid[r1][c1];
            if(r1!=r2 || c1!=c2)
                ans+=grid[r2][c2];
            ans+=max({dp(r1, c1+1, c2+1, grid), dp(r1+1, c1, c2+1, grid), dp(r1, c1+1, c2, grid), dp(r1+1, c1, c2, grid)});
            memo[r1][c1][c2] = ans;
            return ans;
        }
    }
    int cherryPickup(vector<string>& grid1) {
        N = grid1.size();
        vector<vector<int>> grid2(N,vector<int>(N));
       for(int i=0;i<N;i++){
     string s = grid1[i];
        for(int j=0;j<N;j++){
  char c=s[j];
        if(c=='*')grid2[i][j]=0;
  if(c=='$')grid2[i][j]=1;
  if(c=='X')grid2[i][j]=-1;
   }
}
    memo.resize(N, vector<vector<int>>(N, vector<int>(N, INT_MIN)));
        return 2*max(0, dp(0, 0, 0, grid2));
}

Mango
Cisco โœ…
using namespace std;

int maximumProfit(vector<int>& prices) {
    int n = prices.size();
    if (n <= 1) return 0;

    int maxProfit = 0;

    for (int i = 0; i < n - 1; ++i) {
        if (prices[i] < prices[i+1]) {
            int buy = prices[i];
            int sell = prices[i+1];
            for (int j = i + 2; j < n; ++j) {
                if (prices[j] > sell) {
                    sell = prices[j];
                }
            }
            maxProfit = max(maxProfit, sell - buy);
        }
    }

    return maxProfit;
}
โ€œElectronics Trainee Engineerโ€โ€ฆ!!

Job Requirements:
โ€ข Fresher BE/Diploma is required (Electronics).
โ€ข Knowledge of MS-Office software (Windows, Word, Excel, PowerPoint and Outlook).

Required skills:
โ€ข Knowledge of electronic components.
โ€ข Knowledge of various electronic testing equipmentโ€™s.
โ€ข Basic understanding of Electronic hardware design.
โ€ข Perform validation process for various auto electric parts.
โ€ข Test system/ Test adaptor maintenance and fault analysis / troubleshooting.
โ€ข Knowledge of PCB designing techniques.
โ€ข Knowledge of vehicle electrical Architecture & standards is added advantage.

Interested Candidates kindly share updated resume on asavari.jadhav@hitachiastemo.com