int solve(string S) {
set<int> decimalValues;
int n = S.length();
for (int i = 1; i < (1 << n); i++) {
int subsequenceDecimal = 0;
for (int j = 0; j < n; j++) {
if (i & (1 << j)) {
subsequenceDecimal = subsequenceDecimal * 2 + (S[j] - '0');
}
}
decimalValues.insert(subsequenceDecimal);
}
int distinctDecimalValues = decimalValues.size();
int moduloResult = distinctDecimalValues % (int)(1e9 + 7);
return moduloResult;
}
Distinct Subsequenceโ
set<int> decimalValues;
int n = S.length();
for (int i = 1; i < (1 << n); i++) {
int subsequenceDecimal = 0;
for (int j = 0; j < n; j++) {
if (i & (1 << j)) {
subsequenceDecimal = subsequenceDecimal * 2 + (S[j] - '0');
}
}
decimalValues.insert(subsequenceDecimal);
}
int distinctDecimalValues = decimalValues.size();
int moduloResult = distinctDecimalValues % (int)(1e9 + 7);
return moduloResult;
}
Distinct Subsequenceโ
int countKSubsequencesWithMaxBeauty(string s, int k) {
vector<int> count(26);
for (char& c : s)
count[c - 'a']++;
nth_element(count.begin(), count.begin() + 26 - k, count.end());
if (k > 26 || count[26 - k] == 0)
return 0;
long long res = 1, comb = 1, bar = count[26 - k], mod = 1e9 + 7, pend = 0;
for (int& freq : count) {
if (freq > bar) {
k--;
res = res * freq % mod;
}
if (freq == bar)
pend++;
}
for (int i = 0; i < k; ++i) {
comb = comb * (pend - i) / (i + 1);
res = res * bar % mod;
}
return res * comb % mod;
}
GOOGLE SPECIAL-SUBSEQUENCE CODE
vector<int> count(26);
for (char& c : s)
count[c - 'a']++;
nth_element(count.begin(), count.begin() + 26 - k, count.end());
if (k > 26 || count[26 - k] == 0)
return 0;
long long res = 1, comb = 1, bar = count[26 - k], mod = 1e9 + 7, pend = 0;
for (int& freq : count) {
if (freq > bar) {
k--;
res = res * freq % mod;
}
if (freq == bar)
pend++;
}
for (int i = 0; i < k; ++i) {
comb = comb * (pend - i) / (i + 1);
res = res * bar % mod;
}
return res * comb % mod;
}
GOOGLE SPECIAL-SUBSEQUENCE CODE
๐1๐คฎ1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: IndiGG
Role: Technology Intern
Batch eligible: 2023 and 2024 grads
Apply: https://www.linkedin.com/jobs/view/3726795075
Role: Technology Intern
Batch eligible: 2023 and 2024 grads
Apply: https://www.linkedin.com/jobs/view/3726795075
Linkedin
IndiGG hiring Technology Interns-Backend & Frontend(Drive 30 Sept to 02 Oct 2023) in Bengaluru, Karnataka, India | LinkedIn
Posted 12:44:28 PM. About IndiGGIndiGG is a โnetwork stateโ built around 500M+ Indian Gamers. IndiGGโs mission is toโฆSee this and similar jobs on LinkedIn.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Sutherland Walk-In Interview
1st October โ 6th October , 9.30 AM โ 5.30 PM
How to Apply:
Interested candidates are invited to attend a walk-in interview. Please mention โHR Priyaโ at the top of your resume. Donโt forget to bring your resume, a photocopy of your Aadhar card, and your COVID-19 vaccination certificate (2/3 doses).
Walk-in Details:
Date: October 1st โ October 6th
Time: 9:30 AM โ 5:30 PM
Location: Survey No. 201, Lanco Hills Technology Park, Lanco Hills, Sai Vaibhav Layout, Manikonda, Hyderabad, 500089, India.
Contact Information: For inquiries, contact Priya at 9032420290.
1st October โ 6th October , 9.30 AM โ 5.30 PM
How to Apply:
Interested candidates are invited to attend a walk-in interview. Please mention โHR Priyaโ at the top of your resume. Donโt forget to bring your resume, a photocopy of your Aadhar card, and your COVID-19 vaccination certificate (2/3 doses).
Walk-in Details:
Date: October 1st โ October 6th
Time: 9:30 AM โ 5:30 PM
Location: Survey No. 201, Lanco Hills Technology Park, Lanco Hills, Sai Vaibhav Layout, Manikonda, Hyderabad, 500089, India.
Contact Information: For inquiries, contact Priya at 9032420290.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Egencia
Role: Software Development Engineer II
Type: Freshers
Location: Gurgaon, India
https://jobs.talenlio.com/job/software-development-engineer-ii
Role: Software Development Engineer II
Type: Freshers
Location: Gurgaon, India
https://jobs.talenlio.com/job/software-development-engineer-ii
Talenlio
Software Development Engineer II - Egencia
Amex GBT Egencia is the only proven, global B2B travel tech platform.
Dear Recruiter,
I hope this message finds you well. I am reaching out to inquire about any suitable job openings that match my qualifications and experience in Software development Engineer .
I would greatly appreciate it if you could keep me informed of any job openings that would be a good match for my profile.
Thank you for considering my request, and I look forward to hearing back from you soon, Please Share this with your Hiring network, It will be a great help for me.
Best regards,
Xyz
Template for connect with Recruiter #veryhelpful
I hope this message finds you well. I am reaching out to inquire about any suitable job openings that match my qualifications and experience in Software development Engineer .
I would greatly appreciate it if you could keep me informed of any job openings that would be a good match for my profile.
Thank you for considering my request, and I look forward to hearing back from you soon, Please Share this with your Hiring network, It will be a great help for me.
Best regards,
Xyz
Template for connect with Recruiter #veryhelpful
Team Formation โ
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str1 = sc.next();
String str2 = sc.next();
if (str1.length() < str2.length()) {
System.out.println("NO");
return;
}
int i = 0;
int j = 0;
while (i < str1.length() && j < str2.length()) {
if (str1.charAt(i) == str2.charAt(j)) {
i++;
j++;
} else if (Character.toUpperCase(str1.charAt(i)) == str2.charAt(j)) {
i++;
j++;
} else if (Character.isUpperCase(str1.charAt(i))) {
System.out.println("NO");
return;
} else {
i++;
}
}
if (j == str2.length()) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str1 = sc.next();
String str2 = sc.next();
if (str1.length() < str2.length()) {
System.out.println("NO");
return;
}
int i = 0;
int j = 0;
while (i < str1.length() && j < str2.length()) {
if (str1.charAt(i) == str2.charAt(j)) {
i++;
j++;
} else if (Character.toUpperCase(str1.charAt(i)) == str2.charAt(j)) {
i++;
j++;
} else if (Character.isUpperCase(str1.charAt(i))) {
System.out.println("NO");
return;
} else {
i++;
}
}
if (j == str2.length()) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
๐1