TCS NQT Resources
For Jobs, internship and coding contests updates :- https://t.me/placementlelo If you want any other exam answers for free Contact us :- @exam_cheating_bot Collaborations/ Paid Promotions: Contact - @growth_admin
إظهار المزيد📈 نظرة تحليلية على قناة تيليجرام TCS NQT Resources
تُعد قناة TCS NQT Resources (@tcs_nqt_guide) في القطاع اللغوي الإنكليزية لاعباً نشطاً. يضم المجتمع حالياً 33 717 مشتركاً، محتلاً المرتبة 5 592 في فئة التعليم والمرتبة 11 824 في منطقة الهند.
📊 مؤشرات الجمهور والحراك
منذ تأسيسه في невідомо، حقق المشروع نمواً سريعاً وجمع 33 717 مشتركاً.
بحسب آخر البيانات بتاريخ 28 أغسطس, 2026، تحافظ القناة على نشاط مستقر. خلال آخر 30 يوماً تغيّر عدد الأعضاء بمقدار -456، وفي آخر 24 ساعة بمقدار 0، مع بقاء الوصول العام مرتفعاً.
- حالة التحقق: غير موثّقة
- معدل التفاعل (ER): يبلغ متوسط تفاعل الجمهور 0%. وخلال أول 24 ساعة من النشر يحصد المحتوى عادةً N/A% من ردود الفعل نسبةً إلى إجمالي المشتركين.
- وصول المنشورات: يحصل كل منشور على متوسط 0 مشاهدة. وخلال اليوم الأول يجمع عادةً 0 مشاهدة.
- التفاعلات والاستجابة: يتفاعل الجمهور بانتظام؛ متوسط التفاعلات لكل منشور يبلغ 0.
- الاهتمامات الموضوعية: يركز المحتوى على مواضيع رئيسية مثل deloitte, tcs, nla, dp[i][j][(l, graduation.
📝 الوصف وسياسة المحتوى
يصف المؤلف القناة بأنها مساحة للتعبير عن الآراء الذاتية:
“For Jobs, internship and coding contests updates :- https://t.me/placementlelo
If you want any other exam answers for free Contact us :- @exam_cheating_bot
Collaborations/ Paid Promotions:
Contact - @growth_admin”
بفضل وتيرة التحديث المرتفعة (أحدث البيانات بتاريخ 29 أغسطس, 2026) تحافظ القناة على حداثتها ومستوى وصول مرتفع. وتُظهر التحليلات تفاعلاً نشطاً من الجمهور، ما يجعلها نقطة تأثير مهمة ضمن فئة التعليم.
جاري تحميل البيانات...
| التاريخ | نمو المشتركين | الإشارات | القنوات | |
| 27 أغسطس | +3 | |||
| 26 أغسطس | 0 | |||
| 25 أغسطس | 0 | |||
| 24 أغسطس | 0 | |||
| 23 أغسطس | 0 | |||
| 22 أغسطس | 0 | |||
| 21 أغسطس | 0 | |||
| 20 أغسطس | +1 | |||
| 19 أغسطس | 0 | |||
| 18 أغسطس | 0 | |||
| 17 أغسطس | 0 | |||
| 16 أغسطس | 0 | |||
| 15 أغسطس | 0 | |||
| 14 أغسطس | 0 | |||
| 13 أغسطس | 0 | |||
| 12 أغسطس | 0 | |||
| 11 أغسطس | 0 | |||
| 10 أغسطس | 0 | |||
| 09 أغسطس | 0 | |||
| 08 أغسطس | 0 | |||
| 07 أغسطس | 0 | |||
| 06 أغسطس | +2 | |||
| 05 أغسطس | 0 | |||
| 04 أغسطس | 0 | |||
| 03 أغسطس | 0 | |||
| 02 أغسطس | 0 | |||
| 01 أغسطس | 0 |
| 2 | TCS FREE NQT - Biggest Mass Hiring:
Graduation Year: 2024 / 2025 / 2026
Eligibility: BTech / BE / MTech / ME / MCA / MSc / MS
Salary:
Ninja - 3.36 LPA
Digital - 7 LPA
Prime - 9 LPA for UG and 11.5 LPA for PG
Location: PAN India
Apply Link: https://www.tcs.com/careers/india/tcs-all-india-nqt-hiring
Complete Application Process: https://youtu.be/YEjMevJe9wc
Telegram: https://telegram.me/PLACEMENTLELO
Registration End Date: 20 March 2026
Test Date: 10 March 2026 Onwards
✅ Share this with your friends 😇 | 1 837 |
| 3 | ⚠ Message was hidden by channel owner | 1 |
| 4 | Now, All 100% Correct TCS CodeVita Codes will be posted on both of these channels 👇🏻
1. https://telegram.me/PLACEMENTLELO
2. https://telegram.me/OFF_CAMPUS_JOBS_AND_INTERNSHIPS
Must Join both groups ✅
Follow Whatsapp - https://whatsapp.com/channel/0029Va4bojk90x2rq1LgdD1a | 6 746 |
| 5 | C++
Cable Wrap
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N, M;
cin >> N >> M;
vector<string> grid(N);
for (int i = 0; i < N; i++) {
grid[i].resize(M);
for (int j = 0; j < M; j++) {
cin >> grid[i][j];
}
}
vector<int> horizontal_rods, vertical_rods;
for (int i = 0; i < N; i++) {
if (all_of(grid[i].begin(), grid[i].end(), [](char c){ return c != '.'; }))
horizontal_rods.push_back(i);
}
for (int j = 0; j < M; j++) {
bool full = true;
for (int i = 0; i < N; i++)
if (grid[i][j] == '.') full = false;
if (full) vertical_rods.push_back(j);
}
vector<vector<bool>> is_cross(N, vector<bool>(M, false));
for (int c : vertical_rods) {
for (int i = 0; i < N; i++) {
int left = c - 1, right = c + 1;
if (left >= 0 && right < M && grid[i][left] == 'C' && grid[i][right] == 'C')
is_cross[i][c] = true;
}
}
for (int r : horizontal_rods) {
for (int j = 0; j < M; j++) {
int up = r - 1, down = r + 1;
if (up >= 0 && down < N && grid[up][j] == 'C' && grid[down][j] == 'C')
is_cross[r][j] = true;
}
}
vector<vector<bool>> cable(N, vector<bool>(M, false));
for (int i = 0; i < N; i++)
for (int j = 0; j < M; j++)
if (grid[i][j] == 'C' || is_cross[i][j])
cable[i][j] = true;
vector<vector<int>> adj(N * M);
int di[4] = {-1, 0, 1, 0};
int dj[4] = {0, 1, 0, -1};
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
if (!cable[i][j]) continue;
int id = i * M + j;
for (int d = 0; d < 4; d++) {
int ni = i + di[d], nj = j + dj[d];
if (ni >= 0 && ni < N && nj >= 0 && nj < M && cable[ni][nj])
adj[id].push_back(ni * M + nj);
}
}
}
int start = -1;
for (int i = 0; i < N && start == -1; i++)
for (int j = 0; j < M; j++)
if (cable[i][j] && adj[i * M + j].size() == 1) {
start = i * M + j;
break;
}
vector<bool> visited(N * M, false);
vector<int> sum_h(N, 0), sum_v(M, 0);
int curr = start, prevv = -1;
visited[curr] = true;
while (true) {
int cr = curr / M, cc = curr % M;
int nextt = -1;
for (int nb : adj[curr])
if (nb != prevv && !visited[nb]) {
nextt = nb;
break;
}
if (is_cross[cr][cc] && prevv != -1) {
int pr = prevv / M, pc = prevv % M;
int sign = (grid[cr][cc] == 'C') ? 1 : -1;
if (pr == cr)
sum_v[cc] += ((pc < cc) ? 1 : -1) * sign;
else
sum_h[cr] += ((pr < cr) ? 1 : -1) * sign;
}
if (nextt == -1) break;
prevv = curr;
curr = nextt;
visited[curr] = true;
}
long long answer = 0;
for (int r : horizontal_rods) answer += abs(sum_h[r]) / 2;
for (int c : vertical_rods) answer += abs(sum_v[c]) / 2;
cout << answer;
return 0;
}
C++
Cable Wrap
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9 | 6 011 |
| 6 | ⚠ Message was hidden by channel owner | 50 |
| 7 | C++
Order It Code
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9
#include <bits/stdc++.h>
using namespace std;
static int min_ops(const vector<int>& a) {
int n = (int)a.size();
string s(n, '\0'), g(n, '\0');
for (int i = 0; i < n; ++i) s[i] = char(a[i]);
for (int i = 0; i < n; ++i) g[i] = char(i);
if (s == g) return 0;
vector<array<int,3>> mv;
mv.reserve(n * n * n);
for (int i = 0; i < n; ++i) {
for (int j = i + 1; j <= n; ++j) {
int ln = j - i;
for (int k = 0; k <= n - ln; ++k) {
if (k == i) continue;
mv.push_back({i, j, k});
}
}
}
deque<string> q1, q2;
unordered_map<string,int> d1, d2;
q1.push_back(s); d1.emplace(s, 0);
q2.push_back(g); d2.emplace(g, 0);
auto expand = [&](deque<string>& q, unordered_map<string,int>& dself,
unordered_map<string,int>& dother) -> int {
int m = (int)q.size();
while (m--) {
string x = q.front(); q.pop_front();
int dx = dself[x];
for (auto &t : mv) {
int i = t[0], j = t[1], k = t[2];
int ln = j - i;
string b = x.substr(i, ln);
string r = x.substr(0, i) + x.substr(j);
string y = r.substr(0, k) + b + r.substr(k);
if (dself.find(y) != dself.end()) continue;
int nd = dx + 1;
auto it = dother.find(y);
if (it != dother.end()) return nd + it->second;
dself.emplace(y, nd);
q.push_back(y);
}
}
return -1;
};
while (!q1.empty() && !q2.empty()) {
if (q1.size() <= q2.size()) {
int ans = expand(q1, d1, d2);
if (ans != -1) return ans;
} else {
int ans = expand(q2, d2, d1);
if (ans != -1) return ans;
}
}
return 0;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
if (!(cin >> n)) return 0;
string line;
getline(cin, line); // consume endline after n
getline(cin, line); // blank line
vector<string> sh(n), og(n);
for (int i = 0; i < n; ++i) getline(cin, sh[i]);
getline(cin, line); // blank line
for (int i = 0; i < n; ++i) getline(cin, og[i]);
unordered_map<string,int> mp;
mp.reserve(n * 2);
for (int i = 0; i < n; ++i) mp[og[i]] = i;
vector<int> a(n);
for (int i = 0; i < n; ++i) a[i] = mp[sh[i]];
cout << min_ops(a) << "\n";
return 0;
}
C++
Order It Code
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9 | 1 881 |
| 8 | C++
Uno Code
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9
#include <bits/stdc++.h>
using namespace std;
int findp(int x, vector<int>& p) {
return p[x] == x ? x : p[x] = findp(p[x], p);
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<string> names(n);
for (int i = 0; i < n; i++) cin >> names[i];
vector<int> skill(n);
for (int i = 0; i < n; i++) cin >> skill[i];
unordered_map<string, int> id;
for (int i = 0; i < n; i++) id[names[i]] = i;
int f;
cin >> f;
vector<int> p(n);
iota(p.begin(), p.end(), 0);
for (int i = 0; i < f; i++) {
string a, b;
cin >> a >> b;
int x = findp(id[a], p), y = findp(id[b], p);
if (x != y) p[y] = x;
}
unordered_map<int, vector<int>> clusters;
for (int i = 0; i < n; i++) clusters[findp(i, p)].push_back(i);
vector<vector<int>> group;
vector<int> groupSkill, groupSize;
for (auto& [r, v] : clusters) {
group.push_back(v);
int s = 0;
for (int x : v) s += skill[x];
groupSkill.push_back(s);
groupSize.push_back(v.size());
}
int r;
cin >> r;
int m = group.size();
vector<vector<int>> rival(m);
unordered_map<int, int> idx;
{
int i = 0;
for (auto& [root, _] : clusters) idx[root] = i++;
}
for (int i = 0; i < r; i++) {
string a, b;
cin >> a >> b;
int ga = idx[findp(id[a], p)];
int gb = idx[findp(id[b], p)];
if (ga != gb) {
rival[ga].push_back(gb);
rival[gb].push_back(ga);
}
}
int limit;
cin >> limit;
int best = 0;
int total = 1 << m;
for (int mask = 0; mask < total; mask++) {
int sumSkill = 0, count = 0;
bool valid = true;
for (int i = 0; i < m && valid; i++) {
if (mask & (1 << i)) {
for (int x : rival[i]) {
if (mask & (1 << x)) {
valid = false;
break;
}
}
sumSkill += groupSkill[i];
if (sumSkill > limit) {
valid = false;
break;
}
count += groupSize[i];
}
}
if (valid) best = max(best, count);
}
cout << best;
return 0;
}
C++
Uno Code
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9 | 1 149 |
| 9 | C++
Shape Counts
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
static vector<P> merge_itv(vector<P> v){
sort(v.begin(), v.end());
vector<P> r;
for(auto &p: v){
if(r.empty() || p.first > r.back().second){
r.push_back(p);
}else{
if(p.second > r.back().second) r.back().second = p.second;
}
}
return r;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
if(!(cin >> n)) return 0;
map<ll, vector<P>> hv;
map<ll, vector<P>> vv;
for(int i=0;i<n;i++){
ll x1,y1,x2,y2;
cin >> x1 >> y1 >> x2 >> y2;
if(y1 == y2){
if(x1 > x2) swap(x1,x2);
hv[y1].push_back({x1,x2});
}else{
if(y1 > y2) swap(y1,y2);
vv[x1].push_back({y1,y2});
}
}
struct H { ll y,l,r; };
vector<H> hs;
for(auto &e: hv){
ll y = e.first;
auto m = merge_itv(e.second);
for(auto &q: m) hs.push_back({y, q.first, q.second});
}
struct V { ll x,yb,yt; };
vector<V> vs;
for(auto &e: vv){
ll x = e.first;
auto m = merge_itv(e.second);
for(auto &q: m) vs.push_back({x, q.first, q.second});
}
int h = (int)hs.size();
int v = (int)vs.size();
int w = (h + 63) >> 6;
vector<vector<unsigned long long>> msk(v, vector<unsigned long long>(w, 0ULL));
for(int i=0;i<v;i++){
ll x = vs[i].x, yb = vs[i].yb, yt = vs[i].yt;
for(int j=0;j<h;j++){
const auto &hh = hs[j];
if(yb <= hh.y && hh.y <= yt && hh.l <= x && x <= hh.r){
int b = j >> 6, o = j & 63;
msk[i][b] |= (1ULL << o);
}
}
}
long long ans = 0;
for(int i=0;i<v;i++){
for(int j=i+1;j<v;j++){
long long k = 0;
for(int b=0;b<w;b++){
unsigned long long x = msk[i][b] & msk[j][b];
k += __builtin_popcountll(x);
}
if(k >= 2) ans += k*(k-1)/2;
}
}
cout << ans << "\n";
return 0;
}
C++
Shape Counts
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9 | 1 048 |
| 10 | C++
Smallest Region Code
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9
#include <bits/stdc++.h>
using namespace std;
long long fn(const vector<array<int,4>>& rs, int lo, int hi, int ax) {
int i1 = (ax == 0 ? 0 : 1), i2 = (ax == 0 ? 2 : 3);
set<int> st{lo, hi};
for (auto &r : rs) { st.insert(r[i1]); st.insert(r[i2]); }
vector<int> a(st.begin(), st.end());
vector<int> vf;
for (int x : a) {
bool ok = true;
for (auto &r : rs) if (r[i1] < x && x < r[i2]) { ok = false; break; }
if (ok) vf.push_back(x);
}
long long ans = (long long)1e18;
for (size_t i = 0; i + 1 < vf.size(); ++i) {
int d = vf[i+1] - vf[i];
if (d == 1) return 1;
if (d < ans) ans = d;
}
for (size_t i = 0; i + 1 < a.size(); ++i) {
int x = a[i], y = a[i+1];
if (y - x <= 1) continue;
bool bad = false;
for (auto &r : rs) if (r[i1] <= x && y <= r[i2]) { bad = true; break; }
if (!bad) return 1;
}
return ans;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
if (!(cin >> n)) return 0;
vector<array<int,4>> rs(n);
for (int i = 0; i < n; ++i) cin >> rs[i][0] >> rs[i][1] >> rs[i][2] >> rs[i][3];
int ox1, oy1, ox2, oy2;
cin >> ox1 >> oy1 >> ox2 >> oy2;
long long w = fn(rs, ox1, ox2, 0);
long long h = fn(rs, oy1, oy2, 1);
cout << (w * h) << '\n';
return 0;
}
C++
Smallest Region Code
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9 | 990 |
| 11 | C++
Rasikh Box Code
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int m, n;
if (!(cin >> m >> n)) return 0;
cin.ignore(numeric_limits<streamsize>::max(), '\n');
vector<int> c(n, 0);
for (int i = 0; i < m; ++i) {
string ln, s;
getline(cin, ln);
for (char ch : ln) if (ch != ' ') s.push_back(ch);
for (int j = 0; j < n; ++j) if (s[j] == '*') ++c[j];
}
int k;
cin >> k;
cin.ignore(numeric_limits<streamsize>::max(), '\n');
for (int t = 0; t < k; ++t) {
string d;
getline(cin, d);
vector<int> f(m + 1, 0);
for (int v : c) ++f[v];
vector<int> sfx(m + 2, 0);
int cur = 0;
for (int x = m; x >= 0; --x) {
cur += f[x];
sfx[x] = cur;
}
int nm = n, nn = m;
vector<int> nc(nn, 0);
if (d == "right") {
for (int col = 0; col < nn; ++col) nc[col] = sfx[col + 1];
} else {
for (int col = 0; col < nn; ++col) nc[col] = sfx[m - col];
}
m = nm; n = nn; c.swap(nc);
}
for (int i = 0; i < m; ++i) {
for (int j = 0; j < n; ++j) {
char ch = (i >= m - c[j]) ? '*' : '.';
if (j) cout << ' ';
cout << ch;
}
if (i + 1 < m) cout << '\n';
}
return 0;
}
C++
Rasikh Box Code
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9 | 916 |
| 12 | C++
Gravity Code
https://telegram.me/+_hn3cBQVbGliYTI9
#include <bits/stdc++.h>
using namespace std;
struct P {
int x, y;
bool operator==(const P &o) const { return x == o.x && y == o.y; }
};
struct PH {
size_t operator()(P const &p) const {
return (uint64_t(uint32_t(p.x)) << 32) ^ uint32_t(p.y);
}
};
struct K {
int x, y, s;
bool operator==(const K &o) const { return x == o.x && y == o.y && s == o.s; }
};
struct KH {
size_t operator()(K const &k) const {
uint64_t h = k.x;
h = (h << 21) ^ k.y;
h = (h << 21) ^ k.s;
return size_t(h);
}
};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
vector<long long> a;
long long v;
while (cin >> v) a.push_back(v);
int i = 0;
int n = (int)a[i++];
vector<array<int,4>> sl(n);
for (int j = 0; j < n; j++) {
sl[j][0] = (int)a[i++];
sl[j][1] = (int)a[i++];
sl[j][2] = (int)a[i++];
sl[j][3] = (int)a[i++];
}
int sx = (int)a[i++], sy = (int)a[i++], e = (int)a[i++];
unordered_map<P, vector<int>, PH> g;
unordered_map<K, pair<int,int>, KH> nx;
for (int s = 0; s < n; s++) {
int x1 = sl[s][0], y1 = sl[s][1], x2 = sl[s][2], y2 = sl[s][3];
int dx = (x2 > x1) ? 1 : -1;
int dy = (y2 > y1) ? 1 : -1;
int L = abs(x2 - x1);
if (dy == -1) {
for (int k = 0; k < L; k++) {
int x = x1 + dx * k;
int y = y1 - k;
g[{x,y}].push_back(s);
nx[{x,y,s}] = {x + dx, y - 1};
}
g[{x2,y2}].push_back(s);
} else {
for (int k = 0; k < L; k++) {
int x = x2 - dx * k;
int y = y2 - k;
g[{x,y}].push_back(s);
nx[{x,y,s}] = {x - dx, y - 1};
}
g[{x1,y1}].push_back(s);
}
}
auto fall = [&](int x, int y) -> pair<int,int> {
for (int yy = y - 1; yy >= 0; yy--) {
auto it = g.find({x, yy});
if (it != g.end()) return {x, yy};
}
return {x, 0};
};
int x = sx, y = sy;
if (g.find({x,y}) == g.end()) {
auto p = fall(x, y);
x = p.first; y = p.second;
}
while (true) {
if (y == 0) break;
auto it = g.find({x,y});
if (it == g.end()) {
auto p = fall(x, y);
x = p.first; y = p.second;
continue;
}
auto &ids = it->second;
if (ids.size() == 1) {
int s = ids[0];
auto it2 = nx.find({x,y,s});
if (it2 == nx.end()) {
auto p = fall(x, y);
x = p.first; y = p.second;
continue;
}
if (e == 0) break;
e--;
x = it2->second.first;
y = it2->second.second;
} else {
long long c = 1LL * x * y;
vector<pair<int,pair<int,int>>> dn;
dn.reserve(ids.size());
for (int s : ids) {
auto it3 = nx.find({x,y,s});
if (it3 != nx.end()) dn.push_back({s, it3->second});
}
if ((long long)e <= c) {
if (dn.empty()) {
auto p = fall(x, y);
x = p.first; y = p.second;
continue;
}
break;
}
e -= (int)c;
if (dn.empty()) {
auto p = fall(x, y);
x = p.first; y = p.second;
continue;
}
int bx = 0, by = -1;
for (auto &qq : dn) {
int xx = qq.second.first;
int yy = qq.second.second;
if (yy > by) {
by = yy;
bx = xx;
}
}
if (e == 0) break;
e--;
x = bx; y = by;
}
}
cout << x << " " << y;
return 0;
}
C++
Gravity Code
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9 | 1 015 |
| 13 | C++
XOR on Array ✅
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9
int minimize_difference(int N, vector<int>& A, int K, vector<int>& operand) {
vector<vector<int>> possible_values(N);
for (int idx = 0; idx < N; ++idx) {
set<int> values;
for (int mask = 0; mask < (1 << K); ++mask) {
int new_value = A[idx];
for (int i = 0; i < K; ++i) {
if (mask & (1 << i)) {
new_value ^= operand[i];
}
}
https://telegram.me/PLACEMENTLELO
values.insert(new_value);
}
possible_values[idx] = vector<int>(values.begin(), values.end());
sort(possible_values[idx].begin(), possible_values[idx].end());
}
vector<pair<int, int>> all_values;
for (int i = 0; i < N; ++i) {
for (int value : possible_values[i]) {
all_values.emplace_back(value, i);
}
}
https://telegram.me/PLACEMENTLELO
sort(all_values.begin(), all_values.end());
map<int, int> count;
int left = 0;
int min_range = INT_MAX;
int distinct_count = 0;
https://telegram.me/PLACEMENTLELO
for (int right = 0; right < all_values.size(); ++right) {
int value = all_values[right].first;
int index = all_values[right].second;
if (count[index] == 0) {
++distinct_count;
}
++count[index];
https://telegram.me/PLACEMENTLELO
while (distinct_count == N) {
min_range = min(min_range, value - all_values[left].first);
int left_value = all_values[left].first;
int left_index = all_values[left].second;
--count[left_index];
if (count[left_index] == 0) {
--distinct_count;
}
++left;
}
}
return min_range;
}
C++
XOR on Array ✅
TCS CodeVita Zone 2
https://telegram.me/+_hn3cBQVbGliYTI9 | 1 132 |
| 14 | Latest Off-Campus Jobs and Internships are Uploaded regularly here👇
1. https://telegram.me/PLACEMENTLELO
2. https://telegram.me/OFF_CAMPUS_JOBS_AND_INTERNSHIPS
✅ Must Join ✅ | 3 055 |
| 15 | Share your questions in this group 👇🏻
https://telegram.me/+oZ4x3k1RtXdkNWU1 | 6 091 |
| 16 | TCS CodeVita Round 1 Zone 2 Details:
Date and Time: 31 Oct 3pm to 1 Nov 3pm
You can start the test anytime after 3pm.
There will be 6 coding questions and a total time of 6 hours.
3 coding questions will be of medium difficulty, and the other 3 will be of hard difficulty.
Zone 2 Distribution - Hyderabad, Delhi, Lucknow, Varanasi, Indore, Mumbai
Join this group to discuss answers👇🏻
https://telegram.me/+oZ4x3k1RtXdkNWU1
All the Best !!
Regards @PLACEMENTLELO | 6 447 |
| 17 | TCS CodeVita Answers are uploaded here 👇🏻
https://telegram.me/+_hn3cBQVbGliYTI9
TCS CodeVita Discussion Group 👇🏻
https://telegram.me/+oZ4x3k1RtXdkNWU1
TCS CodeVita Answers Whatsapp Channel 👇🏻
https://whatsapp.com/channel/0029Vb67dZr4o7qMrkr3x70h | 6 710 |
| 18 | ✅ TCS CodeVita Season 13 Complete Guide + Previous Year Questions with Solutions 🔥
Share this with your friends 😇 | 6 541 |
| 19 | Latest Off-Campus Jobs and Internships are Uploaded regularly here👇
1. https://telegram.me/PLACEMENTLELO
2. https://telegram.me/OFF_CAMPUS_JOBS_AND_INTERNSHIPS
✅ Must Join ✅ | 8 479 |
| 20 | Detective Chu Code
C++
100% Correct ✅
TCS CodeVita Round 1 Zone 1
https://telegram.me/+_hn3cBQVbGliYTI9
#include <bits/stdc++.h>
using namespace std;
https://telegram.me/PLACEMENTLELO
int R, C;
vector<string> g;
bool ok(int r, int c) {
return r >= 0 && r < R && c >= 0 && c < C && g[r][c] == '.';
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> R >> C;
g.resize(R);
for (int i = 0; i < R; i++)
cin >> g[i];
https://telegram.me/PLACEMENTLELO
string s;
cin >> s;
int dr[4] = {-1, 0, 1, 0};
int dc[4] = {0, 1, 0, -1};
unordered_set<int> endpos;
for (int r0 = 0; r0 < R; ++r0) {
for (int c0 = 0; c0 < C; ++c0) {
if (g[r0][c0] != '.') continue;
for (int d0 = 0; d0 < 4; ++d0) {
int r = r0, c = c0, d = d0;
bool bad = false;
https://telegram.me/PLACEMENTLELO
for (char ch : s) {
if (ch == 'L')
d = (d + 3) & 3;
else if (ch == 'R')
d = (d + 1) & 3;
else { // 'S'
r += dr[d];
c += dc[d];
if (!ok(r, c)) {
bad = true;
break;
}
}
}
if (!bad)
endpos.insert(r * C + c);
}
}
}
https://telegram.me/PLACEMENTLELO
if (endpos.empty())
cout << "Impossible";
else
cout << endpos.size();
return 0;
}
Detective Chu Code
C++
100% Correct ✅
TCS CodeVita Round 1 Zone 1
https://telegram.me/+_hn3cBQVbGliYTI9 | 8 951 |
