CODING SOLUTIONS | IBM | AMAZON CODING SOLUTIONS
الذهاب إلى القناة على Telegram
8 815
المشتركون
لا توجد بيانات24 ساعات
-207 أيام
-11730 أيام
أرشيف المشاركات
Successfully Done with afternoon slot 28th August😁
Full Exam help done in premium group foundation+Advanced sections 💯😍
✅✅✅✅✅✅✅✅✅💯💯💯💯💯💯💯💯💯💯💯💯💯😍😍😍😍😍😍😍😍😍😍😍
@tcs_rolex
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
vector<int> vec(n, 0);
for (int i = 0; i < n; i++)
{
vec[i];
}
int ans = 1;
for (int i = 1; i < n; i++)
{
if (vec[i - 1] < vec[i])
{
int t = vec[i] - vec[i - 1];
int m = max(m, t);
ans += m;
}
else
{
ans++;
}
}
cout << ans;
return 0;
}
🙂
Telegram - Share✅✅ 👇👇
https://t.me/coding_solutions_all
@tcs_nqt_answers_August
map umap;
vector ans;
for (auto x : words)
{
string t = x;
sort(x.begin(), x.end());
umap[x]++;
}
for (auto x : umap)
{
if (t <= x.second)
ans.push_back(x.first);
}
return ans;
C++ language
Write in side of functions
#include <bits/stdc++.h>
using namespace std;
int getSum(int n)
{
if (n < 10)
{
if (n == 1)
return 1;
else
return 0;
}
int sum = 0;
while (n != 0)
{
sum = sum + n % 10;
n = n / 10;
}
return getSum(sum);
}
int main()
{
int n;
cin>>n;
cout<<getSum(n);
return 0;
}
C++ language
If anyone want to join premium group ?
Join before 1:50PM
Don't message during exam no use
@tcs_rolex
