๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.55K subscribers
5.58K photos
3 videos
95 files
9.9K 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
public static int numPaths(List<List<Integer>> warehouse) {
    int r = warehouse.size(), c = warehouse.get(0).size();
    int[][] paths = new int[r][c];
   
    if (warehouse.get(0).get(0) == 1)
        paths[0][0] = 1;
   
    for (int i = 1; i < r; i++) {
        if (warehouse.get(i).get(0) == 1)
            paths[i][0] = paths[i - 1][0];
    }
   
    for (int j = 1; j < c; j++) {
        if (warehouse.get(0).get(j) == 1)
            paths[0][j] = paths[0][j - 1];
    }
   
    for (int i = 1; i < r; i++) {
        for (int j = 1; j < c; j++) {
            if (warehouse.get(i).get(j) == 1)
                paths[i][j] = paths[i - 1][j] + paths[i][j - 1];
        }
    }
   
    return paths[r - 1][c - 1];
}

Paths in warehouse โœ…
๐Ÿ‘2
Magicpin hiring Interns across product, analytics and strategy and ops. This opportunity is for all college students to work remotely along with their colleges.

What we are looking for:
๏ปฟ๏ปฟGood analytical and problem solving skills
๏ปฟ๏ปฟHigh ownership
๏ปฟ๏ปฟAbility to learn quickly

If you are interested, please drop me an email on arshdeep.gulati@magicpin.in
Ivykids (formerly Yellow Class) hiring a Mernstack developer to join our tech team!

PS - 2023 B.tech batch students are most welcome!

Location - Work from office, Gurgaon.

Interested candidates can share their updated CV at deepanshi@ivypods.com to proceed ahead with the selection process.
int helper(string a,string b){
    int i,j,n=a.size();
    if(n!=b.size())return -1;
    int ans=0,cnt=0;
    for(i=0;i<n;i++){
        if(a[i]==b[i] && a[i]!='?')return -1;
        if(a[i]=='?' && b[i]=='?'){
            cnt++;
            continue;
        }
        if(b[i]=='?'){
            if(a[i]=='W')b[i]='R';
            if(a[i]=='R')b[i]='W';
            ans++;
        }
        if(a[i]=='?'){
            if(b[i]=='W')a[i]='R';
            if(b[i]=='R')a[i]='W';
            ans++;
        }
    }
    int w=0,r=0;
    for(i=0;i<n;i++){
        if(a[i]=='W')w++;
        else if(a[i]=='R')r++;
    }
    int x=abs(w-r);
    // cout<<x<<" "<<cnt<<endl;
    if(x<=cnt)ans+=(2*x);
    else return -1;
    return ans;
}

American Express (Balance the Board)
#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,u,l; cin>>n>>u>>l;
    vector<int>a(n);
    for(int i=0; i<n; i++) cin>>a[i];
    vector<vector<int>>v(2, vector<int>(n,0));
    for(int i=0; i<n; i++){
        if(a[i]==2){
            v[0][i]=1;
            v[1][i]=1;
            u--,l--;
        }
    }
    for(int i=0; i<n; i++){
        if(a[i]==1){
            if(u>0){
                u--;
                v[0][i]=1;
            }
            else{
                v[1][i]=1;
                l--;
            }
        }
    }
    for(int i=0; i<2; i++){
        for(int j=0; j<n; j++)
        cout<<v[i][j]<<" \n"[j==n-1];
    }
}

American express 2nd(by John)
๐Ÿ‘1