๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.6K subscribers
5.6K photos
3 videos
95 files
10.4K 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
async function pulseRate(diagnosisName, doctorId) {
    const apiUrl = 'https://jsonmock.hackerrank.com/api/medical_records';
    let currentPage = 1;
    let totalPages = 1;
    let sumPulseRate = 0;
    let totalCount = 0;

    do {
        const response = await fetch(${apiUrl}?page=${currentPage});
        const data = await response.json();

       
        totalCount = data.total;
        totalPages = data.total_pages;

       
        const records = data.data || [];
        sumPulseRate += records.reduce((acc, record) => acc + record.vitals.pulse, 0);

       
        currentPage++;
    } while (currentPage <= totalPages);

   
    const averagePulseRate = Math.trunc(sumPulseRate / totalCount);

    return averagePulseRate;
}
โค1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <bits/stdc++.h> 
using namespace std;
#define ll long long
map<string, map<string, ll>> user;
map<string, ll> users;
set<string> banks;
vector<string> split(const string &s) {
    stringstream ss(s);
    vector<string> result;
    string token;

    while (getline(ss, token, ',')) {
        result.push_back(token);
    }
    return result;
}
void init(string &s) {
    vector<string> bankers = split(s);
    ll balance = stoll(bankers[2]);
    users[bankers[1]] = balance;
    for (int i = 3; i < bankers.size(); i++) {
        user[bankers[1]].insert({bankers[i], balance});
        banks.insert(bankers[i]);
    }
}
string post(string &s) {
    vector<string> help = split(s);
    ll value = stoll(help[4]);
   
    if (banks.find(help[2]) != banks.end() && banks.find(help[3]) != banks.end())
        return "FAILURE";
   
    if (banks.find(help[3]) != banks.end()) {
        if (users.find(help[2]) == users.end()) return "FAILURE";
        if (user[help[2]].find(help[3]) == user[help[2]].end()) return "FAILURE";
        if (users[help[2]] < value) return "FAILURE";
        users[help[2]] -= value;
        return "SUCCESS";
    }
   
    if (banks.find(help[2]) != banks.end()) {
        if (users.find(help[3]) == users.end()) return "FAILURE";
        if (user[help[3]].find(help[2]) == user[help[3]].end()) return "FAILURE";
        users[help[3]] += value;
        return "SUCCESS";
    }
   
    if (users.find(help[2]) == users.end() || users.find(help[3]) == users.end()) return "FAILURE";
    if (users[help[2]] < value) return "FAILURE";
    users[help[2]] -= value;
    users[help[3]] += value;
    return "SUCCESS";
}

string get(string &s) {
    vector<string> help = split(s);
    if (users.find(help[2]) == users.end()) return "FAILURE";
    return to_string(users[help[2]]);
}
static bool comp(const string &x, const string &y) {
    vector<string> a = split(x);
    vector<string> b = split(y);
    return stoll(a[1]) < stoll(b[1]);
}

string get_command_results(vector<string> commands) {
    vector<string> check;
        for (auto &it : commands) {
        if (it[0] == 'I') {
            init(it);
        } else {
            check.push_back(it);
        }
    }
   
    sort(check.begin(), check.end(), comp);
    map<string, string> res;
        for (auto &it : check) {
        if (it[0] == 'P') {
            res[it] = post(it);
        }
        if (it[0] == 'G') {
            res[it] = get(it);
        }
    }
   
    string ans;
    for (auto &it : commands) {
        if (res.find(it) != res.end()) {
            if (!ans.empty()) ans += ",";
            ans += res[it];
        }
    }
   
    return ans; 
}


Account Balance manager : StripePay Backend โœ…

Stripe โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <iostream>
#include <vector>
#include <string>
using namespace std;
bool s(const string& s1, const string& s2) {
    if (s1.size() != s2.size()) return false;
    int diffCount = 0;
    for (int i = 0; i < s1.size(); ++i) {
    if (s1[i] != s2[i]) {
        diffCount++;
        }
    if (diffCount > 1) return false;
    }
    return (diffCount == 1);
}
vector<string> solve(const vector<string>& start, const vector<string>& fin) {
    vector<string> result(fin.size(), "NO");
    for (int i = 0; i < fin.size(); ++i) {
    for (const string& startStr : start) {
    if (s(startStr, fin[i])) {
    result[i] = "YES";
    break;
            }
        }
    }

    return result;
}
int main() {
    int n, m;
    cin >> n;
    vector<string> start(n);
    for (int i = 0; i < n; ++i) {
        cin >> start[i];
    }
    cin >> m;
    vector<string> fin(m);
    for (int i = 0; i < m; ++i) {
        cin >> fin[i];
    }
    vector<string> result = solve(start, fin);
    for (const string& res : result) {
        cout << res << endl;
    }
    return 0;
}


String operation โœ…
#include <iostream>
#define ll long long
#include <vector>
using namespace std;
ll minSelectionsInWorstCase(vector<int>& choices) {
    ll n = choices.size();
    vector<int> s(n, 0);
    ll t = 0; 
    s[n - 1] = choices[n - 1];
    for (int i = n - 2; i >= 0; --i) {
        s[i] = choices[i] + s[i + 1];
    }
   
    t = s[0];
    return t;
}


Backbencher and bug โœ…
๐Ÿ‘1
Greetings from the Machine Intelligence Signal and Network Lab, Indian Institute of Technology, Delhi. An exciting opportunity awaits you!

We are urgently looking for an Intern to join our lab.

This is an NLP internship focused on Speech-to-Speech Translation. Interested candidates can fill out this Google form:

https://docs.google.com/forms/d/e/1FAIpQLScDXo_KvZ5OAHUpaAIj4NfXZyojmrkYwvsV6mSXXWBjCG-p9w/viewform

This will be a two-stage process. The first round will involve initial shortlisting based on the form, followed by an in-depth interview. The final selection will be made solely on the basis of the interview.

We are looking for at least a 3-6month commitment from the incoming candidate.

Stipend will be discussed on the basis of knowledge level of the incoming candidate and how well the interview goes. We need candidates to work from in-office at IIT Delhi, so remote work is not allowed.

Skills Required:

1. Experience in creating deep learning models from scratch.

2. Practical as well as theoretical knowledge of sequence models like RNNs, LSTMs, and Transformers.

3. Knowledge of working with and the architecture of Seq2Seq Neural Machine Translation using LSTMs, Bahdanau Attention, Transformers, etc.

4. Familiarity with models like BERT, GPT, etc.

5. Experience in fine-tuning Hugging Face models (we plan to use IndicTrans2 specifically, but specific LLM fine-tuning knowledge is not necessary).

6. Proficiency in using deep learning frameworks like PyTorch/TensorFlow (PyTorch preferred).

7. General machine learning/deep learning knowledge.

8. Working knowledge of Speech-to-Speech translation.

9. Willingness to learn and grow.

Perks:
You will get to work on state-of-the-art NMT models and work on pure fleshy model building part.

Do apply! And all the very best!

Make sure to fill the form.

Do checkout our lab: https://misn.iitd.ac.in/index.html

Contact:
Pooja Singh
eez228470@ee.iitd.ac.in
๐Ÿ‘1๐Ÿคฉ1