LeetCode Weekly Solutions
7.28K subscribers
34 photos
11 files
101 links
Latest Jobs and Internships are regularly uploaded here : https://t.me/placementlelo

If you want any other exam answers for free : @exam_cheating_bot

Collaborations: @growth_admin
Download Telegram
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
Guys, most of the questions are same for everyone as there is a pool of questions.
They are just in random order.
Goldman Sachs Exam 100% Correct Answers are uploaded here 👇🏻
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 😇
Cognizant
Database Query Question

https://telegram.me/+Q_kf6B6EFexiNmU9
Cognizant
Database Query Question

https://telegram.me/+Q_kf6B6EFexiNmU9

SELECT instructor.first_name AS "First Name", instructor.last_name AS "Last Name"
FROM instructor
WHERE instructor.type = 'full-time'
  AND instructor.last_name LIKE 'C%';

Cognizant
Database Query Question

https://telegram.me/PLACEMENTLELO
Forwarded from Placement Lelo 2.0
Google Hiring Software Engineer:

Graduation Year: 2024 / 2023

Salary: 35 to 40 LPA
Location: Bengaluru / Gurgaon / Hyderabad / Mumbai / Pune

Apply Link: https://tinyurl.com/55ehdkdj

Telegram: https://telegram.me/OFF_CAMPUS_JOBS_AND_INTERNSHIPS
Bulk hiring is open for these 4 companies:

1. Capgemini
2. Accenture
3. Reliance
4. TCS

Last Date to Apply: 6 October

We have uploaded all the details in the LinkedIn post.

Post Link: https://bit.ly/mass_hiring

Make sure to apply to all 4 opportunities.

Share this with your friends 😇
Leetcode Weekly 419
A
C++

https://telegram.me/+_hn3cBQVbGliYTI9

#include <vector>
#include <unordered_map>
#include <algorithm>

using namespace std;

class Solution {
public:
vector<int> findXSum(vector<int>& nums, int k, int x) {
int n = nums.size();
vector<int> answer;

for (int i = 0; i <= n - k; ++i) {
unordered_map<int, int> frequency;
for (int j = i; j < i + k; ++j) {
frequency[nums[j]]++;
}

vector<pair<int, int>> freqList;
for (const auto& entry : frequency) {
freqList.push_back({entry.second, entry.first});
}

sort(freqList.begin(), freqList.end(), [](const pair<int, int>& a, const pair<int, int>& b) {
if (a.first != b.first) return a.first > b.first;
return a.second > b.second;
});

int sum = 0;
int count = 0;
for (const auto& entry : freqList) {
int frequency = entry.first;
int value = entry.second;
if (count >= x) break;
sum += frequency * value;
count++;
}

answer.push_back(sum);
}

return answer;
}
};

Leetcode Weekly 419
A
C++

https://telegram.me/+_hn3cBQVbGliYTI9