Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO
Kanalga Telegram’da o‘tish
Main channel https://t.me/Coding_000 Contact Admin 👉 @ILOVEU_143 for booking your exam slots Web- https://coding000.github.io/Projects/ 💯% clearance in any placement exams OffCampus -https://t.me/Offcampus_000 Discussion- https://t.me/exams_discussion
Ko'proq ko'rsatish3 341
Obunachilar
Ma'lumot yo'q24 soatlar
-117 kunlar
-5030 kunlar
Postlar arxiv
#include <bits/stdc++.h>
using namespace std;
// Utility method to check whether a character
// is operator or not
bool isOperator(char op)
{
return (op == '+' || op == '*');
}
// method prints minimum and maximum value
// obtainable from an expression
void printMinAndMaxValueOfExp(string exp)
{
vector<int> num;
vector<char> opr;
string tmp = "";
// store operator and numbers in different vectors
for (int i = 0; i < exp.length(); i++)
{
if (isOperator(exp[i]))
{
opr.push_back(exp[i]);
num.push_back(atoi(tmp.c_str()));
tmp = "";
}
else
{
tmp += exp[i];
}
}
// storing last number in vector
num.push_back(atoi(tmp.c_str()));
int len = num.size();
int minVal[len][len];
int maxVal[len][len];
// initializing minval and maxval 2D array
for (int i = 0; i < len; i++)
{
for (int j = 0; j < len; j++)
{
minVal[i][j] = INT_MAX;
maxVal[i][j] = 0;
// initializing main diagonal by num values
if (i == j)
minVal[i][j] = maxVal[i][j] = num[i];
}
}
// looping similar to matrix chain multiplication
// and updating both 2D arrays
for (int L = 2; L <= len; L++)
{
for (int i = 0; i < len - L + 1; i++)
{
int j = i + L - 1;
for (int k = i; k < j; k++)
{
int minTmp = 0, maxTmp = 0;
// if current operator is '+', updating tmp
// variable by addition
if(opr[k] == '+')
{
minTmp = minVal[i][k] + minVal[k + 1][j];
maxTmp = maxVal[i][k] + maxVal[k + 1][j];
}
// if current operator is '*', updating tmp
// variable by multiplication
else if(opr[k] == '*')
{
minTmp = minVal[i][k] * minVal[k + 1][j];
maxTmp = maxVal[i][k] * maxVal[k + 1][j];
}
// updating array values by tmp variables
if (minTmp < minVal[i][j])
minVal[i][j] = minTmp;
if (maxTmp > maxVal[i][j])
maxVal[i][j] = maxTmp;
}
}
}
// last element of first row will store the result
cout << "Minimum value : " << minVal[0][len - 1]
<< ", Maximum value : " << maxVal[0][len - 1];
}
// Driver code to test above methods
int main()
{
string expression = "1+2*3+4*5";
printMinAndMaxValueOfExp(expression);
return 0;
}
C++
Minimum Value Expression
#include <bits/stdc++.h>
using namespace std;
// Utility method to check whether a character
// is operator or not
bool isOperator(char op)
{
return (op == '+' || op == '*');
}
// method prints minimum and maximum value
// obtainable from an expression
void printMinAndMaxValueOfExp(string exp)
{
vector<int> num;
vector<char> opr;
string tmp = "";
// store operator and numbers in different vectors
for (int i = 0; i < exp.length(); i++)
{
if (isOperator(exp[i]))
{
opr.push_back(exp[i]);
num.push_back(atoi(tmp.c_str()));
tmp = "";
}
else
{
tmp += exp[i];
}
}
// storing last number in vector
num.push_back(atoi(tmp.c_str()));
int len = num.size();
int minVal[len][len];
int maxVal[len][len];
// initializing minval and maxval 2D array
for (int i = 0; i < len; i++)
{
for (int j = 0; j < len; j++)
{
minVal[i][j] = INT_MAX;
maxVal[i][j] = 0;
// initializing main diagonal by num values
if (i == j)
minVal[i][j] = maxVal[i][j] = num[i];
}
}
// looping similar to matrix chain multiplication
// and updating both 2D arrays
for (int L = 2; L <= len; L++)
{
for (int i = 0; i < len - L + 1; i++)
{
int j = i + L - 1;
for (int k = i; k < j; k++)
{
int minTmp = 0, maxTmp = 0;
// if current operator is '+', updating tmp
// variable by addition
if(opr[k] == '+')
{
minTmp = minVal[i][k] + minVal[k + 1][j];
maxTmp = maxVal[i][k] + maxVal[k + 1][j];
}
// if current operator is '*', updating tmp
// variable by multiplication
else if(opr[k] == '*')
{
minTmp = minVal[i][k] * minVal[k + 1][j];
maxTmp = maxVal[i][k] * maxVal[k + 1][j];
}
// updating array values by tmp variables
if (minTmp < minVal[i][j])
minVal[i][j] = minTmp;
if (maxTmp > maxVal[i][j])
maxVal[i][j] = maxTmp;
}
}
}
// last element of first row will store the result
cout << "Minimum value : " << minVal[0][len - 1]
<< ", Maximum value : " << maxVal[0][len - 1];
}
// Driver code to test above methods
int main()
{
string expression = "1+2*3+4*5";
printMinAndMaxValueOfExp(expression);
return 0;
}
C++
Minimum Value Expression
#include<bits/stdc++.h>
int max(int a, int b);
/* Returns length of LCS for X[0..m-1], Y[0..n-1] */
int lcs( char *X, char *Y, int m, int n )
{
if (m == 0 || n == 0)
return 0;
if (X[m-1] == Y[n-1])
return 1 + lcs(X, Y, m-1, n-1);
else
return max(lcs(X, Y, m, n-1), lcs(X, Y, m-1, n));
}
/* Utility function to get max of 2 integers */
int max(int a, int b)
{
return (a > b)? a : b;
}
/* Driver program to test above function */
int main()
{
char X[] = "AGGTAB";
char Y[] = "GXTXAYB";
int m = strlen(X);
int n = strlen(Y);
printf("Length of LCS is %d", lcs( X, Y, m, n ) );
return 0;
}
C++
Longest Special Subsequences
Show some love guys ❤️
Share this group fast
Add members
2500 target⚠️⚠️⚠️
@Coding_000😍
Share this group in your WhatsApp grp for any help
✅Share✅Share✅Share ✅share✅
Pangram code Python
Soti code ❤️✅
SOTI & LTI EXAM SOLUTION GROUP 😊
https://t.me/+TF1M5QbSkTEwNjA1
https://t.me/+TF1M5QbSkTEwNjA1
https://t.me/+TF1M5QbSkTEwNjA1
@Coding_000
✅ Share post in ur college Whatsapp grps.
Share this group to everyone today i will send all soti code here😁
Target -3k @Coding_000
✅ Share post in ur college Whatsapp grps.
SOTI & LTI EXAM SOLUTION GROUP
https://t.me/+TF1M5QbSkTEwNjA1
https://t.me/+TF1M5QbSkTEwNjA1
https://t.me/+TF1M5QbSkTEwNjA1
@Coding_000
✅ Share post in ur college Whatsapp grps.
so please share our channel 😁
@Coding_000
All virtusa solutions provided
✅Share✅Share✅Share ✅share✅
MAKE 2.5K😍
Show some love guys ❤️
Share this group fast
Add members
2500 target⚠️⚠️⚠️
@Coding_000😍
Share this group in your WhatsApp grp for any help
✅Share✅Share✅Share ✅share✅
Python ✅
Prime minister Election
Virtusa exam
@Coding_000
Python ✅
Taj code
Virtusa exam
@Coding_000
Endi mavjud! Telegram Tadqiqoti 2025 — yilning asosiy insaytlari 
