int findMaximumGreatness( vector<int>&arr) {
int n = arr.size()
vector<int>v = arr;
sort(begin(v), end(v));
sort(begin(arr), end(arr));
int ans = 0;
int i = n - 1, j = n - 1;
while (i >= 0 && j >= 0) {
if (v[i] > arr[j]) {
ans++;
i--;
j--;
}
else {
j--;
}
}
return ans;
}
FindMaximumGreatness || nvidia 👍
#include <iostream>
#include <vector>
using namespace std;
const int MOD = 1e+7;
int numWays(vector<vector<int>>& grid) {
int n = grid.size();
if (n == 0) return 0;
int m = grid[0].size();
if (m == 0) return 0;
vector<vector<int>> dp(n, vector<int>(m, 0));
dp[0][0] = grid[0][0] == 1 ? 1 : 0;
for (int i = 1; i < n; ++i) {
if (grid[i][0] == 1) dp[i][0] = dp[i-1][0];
}
for (int j = 1; j < m; ++j) {
if (grid[0][j] == 1) dp[0][j] = dp[0][j-1];
}
for (int i = 1; i < n; ++i) {
for (int j = 1; j < m; ++j) {
if (grid[i][j] == 1) {
dp[i][j] = (dp[i-1][j] + dp[i][j-1]) % MOD;
}
}
}
return dp[n-1][m-1];
}
FindSafeWays || Nvidia
import java.util.Scanner;
public class BatchIDGenerator {
static String getBatchID(int n, String f, int m, int dd, String time) {
String v = "AEIOUaeiou", fn = "";
for (char c : f.toCharArray()) if (fn.length() < 3 && v.indexOf(c) == -1) fn += Character.toUpperCase(c);
String[] ms = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"};
return fn + ms[m - 1] + String.format("%02d", dd) + time.replace(".", "");
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), m = sc.nextInt(), dd = sc.nextInt();
String f = sc.next(), time = sc.next();
System.out.println(getBatchID(n, f, m, dd, time));
sc.close();
}
}
Batch Id || Wipro milestone 👍
❤1👀1
JUSPAY || +1yr experience
Test accomplished ❤️
DM for 💯 test Clearance
@Mrtrueliving_ix || @MRTRUELIVING_IX
#JUSPAY #+1YR #Done👌
Test accomplished ❤️
DM for 💯 test Clearance
@Mrtrueliving_ix || @MRTRUELIVING_IX
#JUSPAY #+1YR #Done👌
Successfully cleared Revature
DM for 💯 test Clearance
@Mrtrueliving_ix || @Mrtrueliving_ix
#REVATURE #round2 #Interview
Preview
DM for 💯 test Clearance
@Mrtrueliving_ix || @Mrtrueliving_ix
#REVATURE #round2 #Interview
Preview
Successfully cleared Revature Exam💰
💰 DM for Test Clearance 💰
@Mrtrueliving_ix💰 @Mrtrueliving_ix
#Revature #Round2 #TR
{ Helping Proofs ✓}
@Mrtrueliving_ix
#Revature #Round2 #TR
{ Helping Proofs ✓}
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
All upcoming OA help available
Revature : check ✅
IBM CIC : check Here
Wipro Elite : check IT
Flipkart ^ Other exams Help Available
√100 % Test Clearance ❤️
@Mrtrueliving_ix ✓🎉
Revature : check ✅
IBM CIC : check Here
Wipro Elite : check IT
Flipkart ^ Other exams Help Available
√100 % Test Clearance ❤️
@Mrtrueliving_ix ✓
Please open Telegram to view this post
VIEW IN TELEGRAM