๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.59K 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
#include <bits/stdc++.h>
using namespace std;

int main() {
    long long n;
    cin >> n;

    long long ans = 0;


    for (long long i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            ans += i;
            if (i != n / i) {
                ans += n / i;
            }
        }
    }

    cout << ans << endl;

    return 0;
}

Sum of divisors โœ…
int findNetworkEndpoint(int start, const vector<int>& fromNodes, const vector<int>& toNodes) {
    if (fromNodes.size() <= 0 || toNodes.size() >= 10000) return 0;

    unordered_map<int, int> nodeMap;
    for (size_t i = 0; i < fromNodes.size(); ++i) {
        nodeMap[fromNodes[i]] = toNodes[i];
    }

    while (nodeMap.find(start) != nodeMap.end()) {
        start = nodeMap[start];
    }

    return start;
}


Apple โœ…
def canReachLastStone(stones):
    lastP = len(stones) - 1
    for i in range(lastP, -1, -1):
        if i + stones[i] >= lastP:
            lastP = i
    return 1 if lastP == 0 else 0

Can reach Last stones
Apple โœ…
๐Ÿ˜ฑ2๐Ÿ‘1
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <bits/stdc++.h>

using namespace std;

void solve(vector<int> &curr, int L, int R, int &fm, int &sm) {
    fm = INT_MIN;
    sm = INT_MIN;

    for (int i = L; i <= R; ++i) {
        if (curr[i] > fm) {
            sm = fm;
            fm = curr[i];
        } else if (curr[i] > sm) {
            sm = curr[i];
        }
    }
}

int main() {
    int N, Q;
    cin >> N;

    vector<int> curr(N + 1);
    for (int i = 1; i <= N; ++i) {
        cin >> curr[i];
    }

    cin >> Q;

    for (int q = 0; q < Q; ++q) {
        int L, R;
        cin >> L >> R;

        int fm, sm;
        solve(curr, L, R, fm, sm);
        int ans = (fm + sm) / 2;

        cout << ans << endl;
    }

    return 0;
}

Globallogic โœ…
๐Ÿ‘1
Hi Guys Accenture link is still active . Please kindly apply ..

Those who are 2019 ,2020,21,22 ,23,24kindly use this opportunity

Eligibility Criteria:

Minimum criteria- Any engineering stream of B.E/B.Tech/M.E/MTech or MCA or MSc (CS/IT/Computer Applications/Data Science/Computer Science & Applications) - any year of pass out till 2024.

Apply link :: https://indiacampus.accenture.com/myzone/accenture/1/jobs/25377/job-details
if(word1 == null || word2 == null){
   return (word1 == null && word2 == null) ? 1: -1;
  }
  if(word1.length() != word2.length()){
   return -1;
  }
  return (word1 + word1).contains(word2) ? 1 : -1;

Wells Fargo โœ…
int countSquares(int arr[], int N)
{
    // Stores the count of array elements
    int count = 0;

    // Stores frequency of visited elements
    unordered_map<int, int> m;

    // Traverse the array
    for (int i = 0; i < N; i++) {
        m[arr[i]] = m[arr[i]] + 1;
    }

    for (int i = 0; i < N; i++) {

        // Square of the element
        int square = arr[i] * arr[i];

        // Update the count
        count += m[square];
    }

    // Print the count
    cout << count;
}

Wells Fargo โœ