allcoding1_official
106K subscribers
765 photos
2 videos
73 files
758 links
Download Telegram
🎯Philips is Hiring

Role: Intern

Batch: 2024, 2025

Apply Now:-
https://philips.wd3.myworkdayjobs.com/jobs-and-careers/job/Bangalore/Intern_504512/

Telegram:- @allcoding1_official
👍3
🎯L&T Technology Mega off Campus Hiring For Multiple Roles | Rs 4-6 LPA

Job Title : Multiple Roles
Qualification : B.E/B.Tech
Salary : 4-6 LPA*


Apply Now:-

https://forms.office.com/pages/responsepage.aspx?id=eDMbMYqOXkujP-gKPYumCl54ACWF32ZNsqKK3NlTPy1UM1lOUTA5NUE0UzRGWEdUMVhIUE80QVc0Vi4u


Telegram:- @allcoding1
👍4
Guys

👉 I am doing promotions (real Or fake) I don't know

👉I'm not forcing you. Your decision

👉I am not a responsible to you

👉 I need money that why I'm doing promotions try understand
👍12👎41
🎯Thryve Digital Off Campus Drive Hiring Any Graduate Freshers

Job Role Trainee – Process Analyst
Qualification Any degree
Experience Freshers
Job Location Chennai
CTC 3-5 LPA

Apply Now:- www.allcoding1.com

Telegram:- @allcoding1_official
👍1
🎯Thryve Digital Off Campus Drive Hiring Any Graduate Freshers

Job Role Trainee – Process Analyst
Qualification Any degree
Experience Freshers
Job Location Chennai
CTC 3-5 LPA

Apply Now:- www.allcoding1.com

Telegram:- @allcoding1_official
👍5👎1
class Solution {
public:
  int minOperations(vector<int>& nums, int x, int y) {
    int l = 0;
    int r = ranges::max(nums);

    while (l < r) {
      const int m = (l + r) / 2;
      if (isPossible(nums, x, y, m))
        r = m;
      else
        l = m + 1;
    }

    return l;
  }

private:
  bool isPossible(const vector<int>& nums, int x, int y, int m) {
    long long additionalOps = 0;
    for (const int num : nums)
      additionalOps += max(0LL, (num - 1LL * y * m + x - y - 1) / (x - y));
    return additionalOps <= m;
  }
};

Job Execution

Telegram:- @allcoding1_official
👍71
#include<bits/stdc++.h>
using namespace std;



int main(){
    int n,m;
    cin>>n>>m;

    vector<int>ans(n);

    if(n<=m){
        for(int i=0;i<n;i++){
            ans[i]=i+1;
        }
    }
    else{
        
        int k=n/m;
        // int r=n%m;
        int j=0;
        for(int i=0;i<n;i++){
            ans[i]=j+1;
            j++;
            j%=m;
        }
        

        

    }

    for(int i=0;i<n;i++){
        cout<<ans[i]<<" ";
    }
    cout<<endl;
}

King Dreams
Intuit

Telegram:- @allcoding1_official
👍81
➡️ Deal Price : ₹280

Buy Here :- @SAGdeals
👍4👎3
Solve the Equation

Telegram:- @allcoding1_official
👍2
Special String

Telegram:- @allcoding1_official
👍4
Send Questions
👍2
allcoding1_official
Photo
#include <iostream>
#include <cmath>

struct Circle {
double x; // x-coordinate of the center
double y; // y-coordinate of the center
double r; // radius
};

double distanceBetweenCenters(Circle A, Circle B) {
return sqrt(pow((B.x - A.x), 2) + pow((B.y - A.y), 2));
}

int main() {
Circle A, B;

// Example values
A.x = 0;
A.y = 0;
A.r = 5;
B.x = 10;
B.y = 0;
B.r = 7;

double distance = distanceBetweenCenters(A, B);
double sumOfRadii = A.r + B.r;
double differenceOfRadii = abs(A.r - B.r);

if (distance == sumOfRadii) {
std::cout &lt;&lt; "The circles are touching at a single point." &lt;&lt; std::endl;
} else if (distance &lt; sumOfRadii) {
std::cout &lt;&lt; "The circles are intersecting." &lt;&lt; std::endl;
} else if (distance == differenceOfRadii) {
std::cout &lt;&lt; "The circles are touching from within or without." &lt;&lt; std::endl;
} else {
std::cout &lt;&lt; "The circles are not intersecting." &lt;&lt; std::endl;
}

if ((A.x == B.x) &amp;&amp; (A.y == B.y) &amp;&amp; (A.r == B.r)) {
std::cout &lt;&lt; "The circles are concentric." &lt;&lt; std::endl;
}

return 0;
}


C++

Telegram:- @allcoding1_official
👍2
int min(string str){
unordered_map<char,int>mp;
for(char :str){
  mp[ch]++;
}
unodered_set<int>d;
for(auto it:mp){
  d.insert(it.second);
}
return d.size();

}

Music Teacher
Only 4 test cases pass

Telegram:- @allcoding1_official
👍2
Send a Questions
allcoding1_official
Photo
#include <iostream>
#include <vector>
using namespace std;

bool isValidPermutation(const vector<int>&amp; permutation) {
for (int i = 0; i &lt; permutation.size(); i++) {
if (permutation[i] % (i + 1) != 0 || (i + 1) % permutation[i] != 0) {
return false;
}
}
return true;
}

void generatePermutations(vector<int>&amp; nums, int start, vector<vector<int>&gt;&amp; result) {
if (start == nums.size()) {
result.push_back(nums);
return;
}
for (int i = start; i &lt; nums.size(); i++) {
swap(nums[start], nums[i]);
generatePermutations(nums, start + 1, result);
swap(nums[start], nums[i]);
}
}

int countValidPermutations(int N) {
vector<int> nums(N);
for (int i = 0; i &lt; N; i++) {
nums[i] = i + 1;
}
vector<vector<int>&gt; permutations;
generatePermutations(nums, 0, permutations);

int count = 0;
for (const auto&amp; perm : permutations) {
if (isValidPermutation(perm)) {
count++;
}
}
return count;
}

int main() {
int N = 2;
cout &lt;&lt; "Number of valid permutations: " &lt;&lt; countValidPermutations(N) &lt;&lt; endl;
return 0;
}



Valid permutations

Telegram:- @allcoding1_official
👍6