Forwarded from COGNIZANT EXAM HELP GROUP (Mr Trueliving_ix)
mrtrueliving_ixβοΈ
mrtrueliving_ixβΆοΈ
π¨βπ» π MCQ + Coding Help π π¨βπ»
All Coding+MCQs Exams help Availableβ€οΈ
Aptitude + coding Helpπ
Remote Access AvailableβοΈ
Proofs will be providedβοΈ βοΈ
π―π Genuine Help β
β Accenture (MCQ+ Coding)
β Capgemini
β Cognizant
β Wipro
β Deloitte
β Infosys
β Tech Mahindra
β Paytm
β Samsung
β Linkdin
All Mnc help available
@mrtrueliving_ixβοΈ
@mrtrueliving_ixβΆοΈ
π― Test ClearanceβοΈ
π¨βπ» π MCQ + Coding Help π π¨βπ»
mrtrueliving_ix
π All placement help availableπ
All Coding+MCQs Exams help Available
Aptitude + coding Help
Remote Access Available
Proofs will be provided
π―
π₯ All Companies help Available (Genuine + Clearance guarantee)βΆοΈ
All Mnc help available
@mrtrueliving_ix
@mrtrueliving_ix
π― Test Clearance
π All placement help availableπ
Please open Telegram to view this post
VIEW IN TELEGRAM
Amazon -SDE
Both Codes are done with pics sharing βΊοΈ
All placement help available
OA HELP : @mrtrueliving_ix β
Turing -python developer β
Both codes are done β
All placement exam help available
OA HELP: @mrtrueliving_ixβ
#Turing #python #remote #Done
Both codes are done β
All placement exam help available
OA HELP: @mrtrueliving_ixβ
#Turing #python #remote #Done
Turing -python developer β
Both codes are done β
All placement exam help available
OA HELP: @mrtrueliving_ixβ
#Turing #python #remote #Done
Both codes are done β
All placement exam help available
OA HELP: @mrtrueliving_ixβ
#Turing #python #remote #Done
Goldman Sachs
Accenture On campus
Amazon -SDE
IBM
Oracle
All OA HELP AVAILABLE
DM OA @mrtrueliving_ix β
π― Safe & Success rateAll placement help available
-@mrtrueliving_ix
-@mrtrueliving_ix
#include <vector>
#include <algorithm>
int getMinimumSeconds(std::vector<int>& fileSize) {
int n = fileSize.size();
std::vector<std::pair<int, int>> filesWithIndices(n);
for (int i = 0; i < n; ++i) {
filesWithIndices[i] = {fileSize[i], i};
}
// Sort by file size, then by original index to maintain stability
std::sort(filesWithIndices.begin(), filesWithIndices.end());
// Map original indices to their positions in the sorted array
std::vector<int> sortedIndex(n);
for (int i = 0; i < n; ++i) {
sortedIndex[filesWithIndices[i].second] = i;
}
int maxShift = 0;
for (int i = 0; i < n; ++i) {
int shift = i - sortedIndex[i];
if (shift > maxShift) {
maxShift = shift;
}
}
return maxShift;
}
int main() {
int n;
std::cin >> n;
std::vector<int> fileSize(n);
for (int i = 0; i < n; ++i) {
std::cin >> fileSize[i];
}
int result = getMinimumSeconds(fileSize);
std::cout << result << std::endl;
return 0;
}
Agoda internβ
#include <cmath>
#include <cstdlib>
bool isValidTriangle(int x1, int y1, int x2, int y2, int x3, int y3);
double distance(int x1, int y1, int x2, int y2);
bool isPointInTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int xp, int yp);
double triangleArea(int x1, int y1, int x2, int y2, int x3, int y3);
int pointsBelong(int x1, int y1, int x2, int y2, int x3, int y3, int xp, int yp, int xq, int yq) {
if (!isValidTriangle(x1, y1, x2, y2, x3, y3)) {
return 0;
}
bool pBelongs = isPointInTriangle(x1, y1, x2, y2, x3, y3, xp, yp);
bool qBelongs = isPointInTriangle(x1, y1, x2, y2, x3, y3, xq, yq);
if (pBelongs && qBelongs) {
return 3;
} else if (pBelongs) {
return 1;
} else if (qBelongs) {
return 2;
} else {
return 4;
}
}
bool isValidTriangle(int x1, int y1, int x2, int y2, int x3, int y3) {
double ab = distance(x1, y1, x2, y2);
double bc = distance(x2, y2, x3, y3);
double ac = distance(x1, y1, x3, y3);
return (ab + bc > ac) && (bc + ac > ab) && (ac + ab > bc);
}
double distance(int x1, int y1, int x2, int y2) {
return std::sqrt(std::pow(x2 - x1, 2) + std::pow(y2 - y1, 2));
}
bool isPointInTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int xp, int yp) {
double areaABC = triangleArea(x1, y1, x2, y2, x3, y3);
double areaPAB = triangleArea(xp, yp, x1, y1, x2, y2);
double areaPAC = triangleArea(xp, yp, x1, y1, x3, y3);
double areaPBC = triangleArea(xp, yp, x2, y2, x3, y3);
return std::abs((areaPAB + areaPAC + areaPBC) - areaABC) < 1e-9;
}
double triangleArea(int x1, int y1, int x2, int y2, int x3, int y3) {
return std::abs(x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2.0;
}
Agoda β
#include <bits/stdc++.h>
long getTotalSteps(vector<int>& ht) {
long ans=0,cnt=0;
sort(ht.begin(),ht.end());
for(int i=0;i<ht.size();i++){
if(i<ht.size()-1&&ht[i]!=ht[i+1]){
cnt++;
ans+=cnt;
}
else if(i!=ht.size()-1) ans+=cnt;
}
return ans;
}
Agoda β
from sys import stdin
def main():
elements = stdin.read().strip().split()
n = len(elements)
bell_triangle = [[0] * (n + 1) for _ in range(n + 1)]
bell_triangle[0][0] = 1
for i in range(1, n + 1):
bell_triangle[i][0] = bell_triangle[i - 1][i - 1]
for j in range(1, i + 1):
bell_triangle[i][j] = bell_triangle[i - 1][j - 1] + bell_triangle[i][j - 1]
print(bell_triangle[n][0] - 1)
if __name__ == "__main__":
main()
Set partitioning β
β€1