COGNIZANT EXAM HELP GROUP
Photo
#include <iostream>
#include <vector>
using namespace std;
int giveChocolates(vector<int>& childrenRatings) {
int n = childrenRatings.size();
vector<int> ch(n, 1);
for (int i = 1; i < n; ++i) {
if (childrenRatings[i] > childrenRatings[i - 1]) {
ch[i] = ch[i - 1] + 1;
}
}
for (int i = n - 2; i >= 0; --i) {
if (childrenRatings[i] > childrenRatings[i + 1]) {
ch[i] = max(ch[i], ch[i + 1] + 1);
}
}
int sumChocolates = 0;
for (int chocolates : ch) {
sumChocolates += chocolates;
}
return sumChocolates;
}
int main() {
vector<int> ratings = {1, 3, 4, 3, 2, 1};
cout << "Total chocolates: " << giveChocolates(ratings) << endl;
return 0;
}
Chocolate -cpp✅💯
#include <vector>
using namespace std;
int giveChocolates(vector<int>& childrenRatings) {
int n = childrenRatings.size();
vector<int> ch(n, 1);
for (int i = 1; i < n; ++i) {
if (childrenRatings[i] > childrenRatings[i - 1]) {
ch[i] = ch[i - 1] + 1;
}
}
for (int i = n - 2; i >= 0; --i) {
if (childrenRatings[i] > childrenRatings[i + 1]) {
ch[i] = max(ch[i], ch[i + 1] + 1);
}
}
int sumChocolates = 0;
for (int chocolates : ch) {
sumChocolates += chocolates;
}
return sumChocolates;
}
int main() {
vector<int> ratings = {1, 3, 4, 3, 2, 1};
cout << "Total chocolates: " << giveChocolates(ratings) << endl;
return 0;
}
Chocolate -cpp✅💯
def largestComponent(pcbGrid):
if not pcbGrid:
return 0
m = len(pcbGrid)
n = len(pcbGrid[0])
max_size = 0
def codealpha(i, j):
if i < 0 or i >= m or j < 0 or j >= n or pcbGrid[i][j] == 0:
return 0
size = 1
size += codealpha(i+1, j)
size += codealpha(i-1, j)
size += codealpha(i, j+1)
size += codealpha(i, j-1)
size += codealpha(i+1, j+1)
size += codealpha(i+1, j-1)
size += codealpha(i-1, j+1)
size += codealpha(i-1, j-1)
return size
for i in range(m):
for j in range(n):
if pcbGrid[i][j] == 1:
component_size = codealpha(i, j)
max_size = max(max_size, component_size)
return max_size
if not pcbGrid:
return 0
m = len(pcbGrid)
n = len(pcbGrid[0])
max_size = 0
def codealpha(i, j):
if i < 0 or i >= m or j < 0 or j >= n or pcbGrid[i][j] == 0:
return 0
size = 1
size += codealpha(i+1, j)
size += codealpha(i-1, j)
size += codealpha(i, j+1)
size += codealpha(i, j-1)
size += codealpha(i+1, j+1)
size += codealpha(i+1, j-1)
size += codealpha(i-1, j+1)
size += codealpha(i-1, j-1)
return size
for i in range(m):
for j in range(n):
if pcbGrid[i][j] == 1:
component_size = codealpha(i, j)
max_size = max(max_size, component_size)
return max_size
10/10 miniOrange 💯
COGNIZANT EXAM HELP GROUP
https://docs.google.com/forms/d/e/1FAIpQLScYrwrHDEEa5j3hffk367zMkfQnNKXaApi3AyhyccZ_VFwJCg/viewform Q Minds
Check your mails....❤️💯
All the best dear members
DM for you needs help
🔋🎉🤗
Accenture 12th 10am slot
Test accomplished ❤️🤗
90/90 MCQ s // 2/2 coding 👍
#pic sharing
DM for any kind of OA
@Mrtrueliving_ix
@Mrtrueliving_ix
Mini orange 🍊
Role : software Engineer 🚀✍️
Test accomplished ❤️
DM for any kind of OA
Accenture 7pm slot available ❤️
🔥🔥🔥
@Mrtrueliving_ix
@Mrtrueliving_ix
@Mrtrueliving_ix
COGNIZANT EXAM HELP GROUP
Flipkart all codes available University -python3-✅ Resturant ✅ MEDIA company ✅ DM for help: @Mrtrueliving_ix @Mrtrueliving_ix #paid help 💯 https://t.me/code_alphix/835
Successfully completed Flipkart 💯
Previous helping proofs
https://t.me/code_alphix/836
DM for OA Help @Mrtrueliving_ix
@Mrtrueliving_ix. @Mrtrueliving_ix ||
Previous helping proofs
https://t.me/code_alphix/836
DM for OA Help @Mrtrueliving_ix
@Mrtrueliving_ix. @Mrtrueliving_ix ||
https://career.infosys.com/jobdesc?source=44003&jobReferenceCode=PROGEN-EXTERNAL-186307
Infosys 2018-2024 batch
Dear All,
It's hiring Season! 🚀
Many top MNC's are hiring for Entry-level jobs and Internships currently. Don't miss any updates - apply based on your profile match. We are here to provide real-time job notifications.
Best of luck!❤️🤝
It's hiring Season! 🚀
Many top MNC's are hiring for Entry-level jobs and Internships currently. Don't miss any updates - apply based on your profile match. We are here to provide real-time job notifications.
Best of luck!❤️🤝