๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.6K photos
3 videos
95 files
10.2K 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
int maxDepth(TreeNode* root) {
        if(!root)   return 0;
        int l=1+maxDepth(root->left);
        int r=1+maxDepth(root->right);
       return max(l,r);
    }

Infibeam height of tree โœ…
#include<bits/stdc++.h>
using namespace std;

int solve(vector<int>& t, int i) {
    if(i >= t.size()) return 0;
    int l = solve(t, 2*i + 1);
    t[i] += l;
    int r = solve(t, 2*i + 2);
    return t[i] + r;
}

void print(vector<int>& t, int i) {
    if(i >= t.size()) return;
    print(t, 2*i + 1);
    cout << t[i] << "\n";
    print(t, 2*i + 2);
}

int main() {
    string s;
    getline(cin, s);
    stringstream ss(s);
    vector<int> t;
    int n;
    while(ss >> n) {
        t.push_back(n);
    }
    solve(t, 0);
    print(t, 0);
    return 0;
}

Replace node value with sum of self and left subtree โœ…
๐Ÿ‘1
Grant Thornton is looking for candidates on consultant position who have  extensively worked in risk advisory domain (IA, IFC and SOP) during articleship and post qualification (0-2 yrs) experience for Gurgaon location.

Interested candidates can share CVs on himanshi.goyal@in.gt.com