Range Minimize
C++
Codechef Starters 152
https://telegram.me/+Q_kf6B6EFexiNmU9
#include<bits/stdc++.h>
using namespace std;
#define int long long
int32_t main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
vector<int>vec(n);
for(int i=0;i<n;i++)
{
cin>>vec[i];
}
sort(vec.begin(),vec.end());
int ans1=vec[n-3]-vec[0];
int ans2=vec[n-1]-vec[2];
int ans3=vec[n-2]-vec[1];
cout<<min(ans1,min(ans2,ans3))<<endl;
}
return 0;
}
Range Minimize
C++
Codechef Starters 152
https://telegram.me/+Q_kf6B6EFexiNmU9
C++
Codechef Starters 152
https://telegram.me/+Q_kf6B6EFexiNmU9
#include<bits/stdc++.h>
using namespace std;
#define int long long
int32_t main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
vector<int>vec(n);
for(int i=0;i<n;i++)
{
cin>>vec[i];
}
sort(vec.begin(),vec.end());
int ans1=vec[n-3]-vec[0];
int ans2=vec[n-1]-vec[2];
int ans3=vec[n-2]-vec[1];
cout<<min(ans1,min(ans2,ans3))<<endl;
}
return 0;
}
Range Minimize
C++
Codechef Starters 152
https://telegram.me/+Q_kf6B6EFexiNmU9
Maximize Hamming Distance
C++
Codechef Starters 152
https://telegram.me/+Q_kf6B6EFexiNmU9
#include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main() {
int test_cases;
cin >> test_cases;
while (test_cases--) {
int num_rows, num_strings;
cin >> num_rows >> num_strings;
vector<pair<int, pair<int, int>>> data(num_rows);
int result = 0;
while (num_strings--) {
string line;
cin >> line;
int zero_count = 0;
int one_count = 0;
int question_count = 0;
for (int idx = 0; idx < line.size(); idx++) {
if (line[idx] == '0') {
data[idx].first++;
} else if (line[idx] == '1') {
data[idx].second.first++;
} else {
data[idx].second.second++;
}
}
}
for (int idx = 0; idx < num_rows; idx++) {
int zeros = data[idx].first;
int ones = data[idx].second.first;
int questions = data[idx].second.second;
while (questions--) {
if (zeros <= ones) {
zeros++;
} else {
ones++;
}
}
result += (zeros * ones);
}
cout << result << endl;
}
return 0;
}
Maximize Hamming Distance
C++
Codechef Starters 152
https://telegram.me/+Q_kf6B6EFexiNmU9
C++
Codechef Starters 152
https://telegram.me/+Q_kf6B6EFexiNmU9
#include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main() {
int test_cases;
cin >> test_cases;
while (test_cases--) {
int num_rows, num_strings;
cin >> num_rows >> num_strings;
vector<pair<int, pair<int, int>>> data(num_rows);
int result = 0;
while (num_strings--) {
string line;
cin >> line;
int zero_count = 0;
int one_count = 0;
int question_count = 0;
for (int idx = 0; idx < line.size(); idx++) {
if (line[idx] == '0') {
data[idx].first++;
} else if (line[idx] == '1') {
data[idx].second.first++;
} else {
data[idx].second.second++;
}
}
}
for (int idx = 0; idx < num_rows; idx++) {
int zeros = data[idx].first;
int ones = data[idx].second.first;
int questions = data[idx].second.second;
while (questions--) {
if (zeros <= ones) {
zeros++;
} else {
ones++;
}
}
result += (zeros * ones);
}
cout << result << endl;
}
return 0;
}
Maximize Hamming Distance
C++
Codechef Starters 152
https://telegram.me/+Q_kf6B6EFexiNmU9
Juspay Exam Answers are uploaded here 👇
https://telegram.me/+_hn3cBQVbGliYTI9
Juspay Exam Discussion Group 👇
https://telegram.me/+8B154b769wk4ZjY9
Share with your friends 😇
https://telegram.me/+_hn3cBQVbGliYTI9
Juspay Exam Discussion Group 👇
https://telegram.me/+8B154b769wk4ZjY9
Share with your friends 😇
Goldman Sachs Aptitude QuestionsAnswers with Explanation (2).pdf
3.1 MB
Goldman Sachs Aptitude Questions and Answers with Explanation 🔥
✅ Share with your friends 😇
✅ Share with your friends 😇
Goldman Sachs 22nd September Exam:
Goldman Sachs Exam Answers will be uploaded here 👇🏻
https://telegram.me/+_hn3cBQVbGliYTI9
Goldman Sachs Discussion Group 👇🏻
https://telegram.me/+njYA5MfMVcs5OTRl
Share with your friends and juniors of 2026 batch 😇
Goldman Sachs Exam Answers will be uploaded here 👇🏻
https://telegram.me/+_hn3cBQVbGliYTI9
Goldman Sachs Discussion Group 👇🏻
https://telegram.me/+njYA5MfMVcs5OTRl
Share with your friends and juniors of 2026 batch 😇
Forwarded from Goldman Sachs Exam Solutions
Forwarded from Goldman Sachs Exam Solutions
Forwarded from Goldman Sachs Exam Solutions
Question -
A fighter pilot observes a boy on the ground at an angle of depression of 45°. After flying for some time, the angle of depression changed to 60°. If the fighter plane is flying at a height of 300 m, then find the time (in seconds) for which the fighter plane flew between the two instances of observation. (Speed of fighter plane = 360 km/hr)
Pick ONE option
2 - √3
3 -√3
2
None of these
Answer: 3 - √3
https://telegram.me/+_hn3cBQVbGliYTI9
A fighter pilot observes a boy on the ground at an angle of depression of 45°. After flying for some time, the angle of depression changed to 60°. If the fighter plane is flying at a height of 300 m, then find the time (in seconds) for which the fighter plane flew between the two instances of observation. (Speed of fighter plane = 360 km/hr)
Pick ONE option
2 - √3
3 -√3
2
None of these
Answer: 3 - √3
https://telegram.me/+_hn3cBQVbGliYTI9
Forwarded from Goldman Sachs Exam Solutions
Forwarded from Goldman Sachs Exam Solutions
Guys, most of the questions are same for everyone as there is a pool of questions.
They are just in random order.
They are just in random order.
Forwarded from Goldman Sachs Exam Solutions
Forwarded from Goldman Sachs Exam Solutions
Forwarded from Goldman Sachs Exam Solutions
Forwarded from Goldman Sachs Exam Solutions
Forwarded from Goldman Sachs Exam Solutions
Forwarded from Goldman Sachs Exam Solutions
Forwarded from Goldman Sachs Exam Solutions
Forwarded from Goldman Sachs Exam Solutions
✅ Goldman Sachs Exam 100% Correct Answers are uploaded here 👇🏻
https://youtu.be/BYwtNx7zaMg
https://youtu.be/BYwtNx7zaMg
Share with your friends 😇
https://youtu.be/BYwtNx7zaMg
https://youtu.be/BYwtNx7zaMg
Share with your friends 😇
Cognizant Exam Answers will be uploaded here 👇🏻
https://telegram.me/+Q_kf6B6EFexiNmU9
Cognizant Exam Discussion Group 👇🏻
https://telegram.me/+8B154b769wk4ZjY9
Share this with your friends 😇
https://telegram.me/+Q_kf6B6EFexiNmU9
Cognizant Exam Discussion Group 👇🏻
https://telegram.me/+8B154b769wk4ZjY9
Share this with your friends 😇