๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
vector<int>findSubsequence(vector<int>arr) { map<int, vector<int>> ind; for (int i = 0; i < arr.size(); ++i) { ind[arr[i]].push_back(i); } vector<int> res; res.push_back(-1); for (auto &[_, v] : ind) { if (v.size()โฆ
โ
import java.util.*;
public class AnagramSubsequenceFinder {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.nextLine();
int N = sc.nextInt();
sc.nextLine();
String[] W = new String[N];
for (int i = 0; i < N; i++) {
W[i] = sc.nextLine();
}
int[] freqS = getFrequency(S);
int count = 0;
for (String w : W) {
if (isValidAnagramSubsequence(freqS, w)) {
count++;
}
}
System.out.println(count);
}
private static int[] getFrequency(String S) {
int[] freq = new int[26];
for (char c : S.toCharArray()) {
freq[c - 'a']++;
}
return freq;
}
private static boolean isValidAnagramSubsequence(int[] freqS, String w) {
int[] freqW = new int[26];
for (char c : w.toCharArray()) {
freqW[c - 'a']++;
}
for (int i = 0; i < 26; i++) {
if (freqW[i] > freqS[i]) {
return false;
}
}
return true;
}
}
// Minimal substring length
public class AnagramSubsequenceFinder {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.nextLine();
int N = sc.nextInt();
sc.nextLine();
String[] W = new String[N];
for (int i = 0; i < N; i++) {
W[i] = sc.nextLine();
}
int[] freqS = getFrequency(S);
int count = 0;
for (String w : W) {
if (isValidAnagramSubsequence(freqS, w)) {
count++;
}
}
System.out.println(count);
}
private static int[] getFrequency(String S) {
int[] freq = new int[26];
for (char c : S.toCharArray()) {
freq[c - 'a']++;
}
return freq;
}
private static boolean isValidAnagramSubsequence(int[] freqS, String w) {
int[] freqW = new int[26];
for (char c : w.toCharArray()) {
freqW[c - 'a']++;
}
for (int i = 0; i < 26; i++) {
if (freqW[i] > freqS[i]) {
return false;
}
}
return true;
}
}
// Minimal substring length
Upstox is hiring for different roles.
SDE 1 (Backend), SDE 1 (iOS), SDE 2 (Frontend) and UI/UX Intern
Fill the form if eligible and interested: https://docs.google.com/forms/d/e/1FAIpQLSdd0jPiasglYGikjSOrlc1KkbcIYp3S5VAx005OifzBNS44ow/viewform
SDE 1 (Backend), SDE 1 (iOS), SDE 2 (Frontend) and UI/UX Intern
Fill the form if eligible and interested: https://docs.google.com/forms/d/e/1FAIpQLSdd0jPiasglYGikjSOrlc1KkbcIYp3S5VAx005OifzBNS44ow/viewform
def minimumSquads(parents):
n = len(parents)
depth = [-1] * n
def calculate_depth(node):
if depth[node] != -1:
return depth[node]
if parents[node] == -1:
depth[node] = 0
else:
depth[node] = calculate_depth(parents[node]) + 1
return depth[node]
max_depth = 0
for i in range(n):
max_depth = max(max_depth, calculate_depth(i))
return max_depth + 1
Minimum squads โ
n = len(parents)
depth = [-1] * n
def calculate_depth(node):
if depth[node] != -1:
return depth[node]
if parents[node] == -1:
depth[node] = 0
else:
depth[node] = calculate_depth(parents[node]) + 1
return depth[node]
max_depth = 0
for i in range(n):
max_depth = max(max_depth, calculate_depth(i))
return max_depth + 1
Minimum squads โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Goldman Sachs
Role : Graduate Role (multiple roles)
Batch : 2026 passouts(non-engineering)
Link. : https://www.goldmansachs.com/careers/students/programs/india/graduate-campus-hiring-program.html
Last date to register is July 14.
Role : Graduate Role (multiple roles)
Batch : 2026 passouts(non-engineering)
Link. : https://www.goldmansachs.com/careers/students/programs/india/graduate-campus-hiring-program.html
Last date to register is July 14.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Microsoft Hiring Software Engineer Intern
Batch : 2026
https://jobs.careers.microsoft.com/us/en/job/1735688/Software-Engineering-Intern
Batch : 2026
https://jobs.careers.microsoft.com/us/en/job/1735688/Software-Engineering-Intern
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Softwaysolutions is hiring for UI Developer - Remote
Expected Salary: 4-10 LPA
Apply here:
https://softwaysolutions.freshteam.com/jobs/eJZzvJujN45l/ui-developer-contractor-remote
Expected Salary: 4-10 LPA
Apply here:
https://softwaysolutions.freshteam.com/jobs/eJZzvJujN45l/ui-developer-contractor-remote
Freshteam
Hiring for UI Developer (Contractor) (Remote) - Associate
Posted by : Softway | javascript,HTML,CSS,Framer motion,GSAP,anime.js,Lottie,JEST FRAMEWORK,GRAPHQL,REST API,WEBPACK,Babel,CSS animation
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐AskmeOffers.com is hiring for Multiple Roles - Remote
Expected Salary: 15-25 LPA
Apply here for Software Engineer:
https://linkedin.com/jobs/view/3965806700/
Apply here for Quality Assurance Engineer:
https://linkedin.com/jobs/view/3965847630/
Expected Salary: 15-25 LPA
Apply here for Software Engineer:
https://linkedin.com/jobs/view/3965806700/
Apply here for Quality Assurance Engineer:
https://linkedin.com/jobs/view/3965847630/
Linkedin
AskmeOffers.com hiring Software Engineer in India | LinkedIn
Posted 4:54:18 PM. Company Description At AskMeOffers, our mission is to revolutionize the online shopping experienceโฆ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)
Company โ IIDE Education Private Limited
Role โ Data Analyst Internship
Exp. โ Fresher
Apply Here โ https://internshala.com/internship/detail/data-analyst-internship-in-mumbai-at-iide-education-private-limited1720264879?utm_source=cp_link&referral=web_share
Company โ Blackcoffer
Role โ Data Science Internship
Exp. โ Fresher
Apply Here โ https://internshala.com/internship/details/work-from-home-data-science-internship-at-blackcoffer1720199867?utm_source=cp_link&referral=web_share
Company โ AskmeOffers.com
Role โ Data Analyst
Exp. โ Fresher
Apply Here โ https://www.linkedin.com/jobs/view/3965852124
Company โ White Gold Bullion Private Limited
Role โ Mis Executive
Exp. โ 0-3 yrs
Apply Here โ https://www.foundit.in/job/mis-executive-white-gold-bullion-private-limited-bengaluru-bangalore-31074671?searchId=b0b11ba6-607b-4d50-91c9-b823e3ce49dd
Company โ Blockchain for the Next Billion
Role โ Data Analyst
Exp. โ 0-5 yrs
Apply Here โ https://www.linkedin.com/jobs/view/3966385446
Role โ Data Analyst Internship
Exp. โ Fresher
Apply Here โ https://internshala.com/internship/detail/data-analyst-internship-in-mumbai-at-iide-education-private-limited1720264879?utm_source=cp_link&referral=web_share
Company โ Blackcoffer
Role โ Data Science Internship
Exp. โ Fresher
Apply Here โ https://internshala.com/internship/details/work-from-home-data-science-internship-at-blackcoffer1720199867?utm_source=cp_link&referral=web_share
Company โ AskmeOffers.com
Role โ Data Analyst
Exp. โ Fresher
Apply Here โ https://www.linkedin.com/jobs/view/3965852124
Company โ White Gold Bullion Private Limited
Role โ Mis Executive
Exp. โ 0-3 yrs
Apply Here โ https://www.foundit.in/job/mis-executive-white-gold-bullion-private-limited-bengaluru-bangalore-31074671?searchId=b0b11ba6-607b-4d50-91c9-b823e3ce49dd
Company โ Blockchain for the Next Billion
Role โ Data Analyst
Exp. โ 0-5 yrs
Apply Here โ https://www.linkedin.com/jobs/view/3966385446
Internshala
Data Analyst Internship in Mumbai at IIDE Education Private Limited
Selected intern's day-to-day responsibilities include:
1. Integrate new technologies into the business.
2. Report using Google Data Studio, Google Sheets, and Excel.
3. Monitor and manage our learning management system.
4. Utilize software suchโฆ
1. Integrate new technologies into the business.
2. Report using Google Data Studio, Google Sheets, and Excel.
3. Monitor and manage our learning management system.
4. Utilize software suchโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Cogntix is hiring for Full Stack Engineer Intern | Hybrid Opportunity | 2023/2024 passout | 50k per month
https://docs.google.com/forms/d/e/1FAIpQLSc9AWJrl_zbV9VtNIWJj_n6EafHrR1-is_OdNY8BjIcZuX4TQ/viewform?usp=sf_link
https://docs.google.com/forms/d/e/1FAIpQLSc9AWJrl_zbV9VtNIWJj_n6EafHrR1-is_OdNY8BjIcZuX4TQ/viewform?usp=sf_link
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
CBTS is hiring for Associate Software Engineer
Experience: 0-2 years
Expected Salary: 5-10 LPA
Apply here:
https://recruiting.adp.com/srccar/public/nghome.guid?c=2190231&d=ExternalCBTS&prc=RMPOD4&r=5001000276506#/
Experience: 0-2 years
Expected Salary: 5-10 LPA
Apply here:
https://recruiting.adp.com/srccar/public/nghome.guid?c=2190231&d=ExternalCBTS&prc=RMPOD4&r=5001000276506#/
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Catchpoint is hiring for Systems Engineer I
Experience: 0 - 1 years
Expected Salary: 6-12 LPA
Apply here:
https://catchpoint.com/careers?gh_jid=4423670005&gh_src=ca21d43d5us
Experience: 0 - 1 years
Expected Salary: 6-12 LPA
Apply here:
https://catchpoint.com/careers?gh_jid=4423670005&gh_src=ca21d43d5us
Catchpoint
Careers | Catchpoint Internet Performance Monitoring
Join the team helping to make the Internet resilient! Take a look at our openings and see where you fit into our company.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Trademo is hiring for Junior DevOps Engineer
Experience: 0 - 1 years
Expected Salary: 6-12 LPA
Apply here:
https://hirist.tech/j/trademo-junior-devops-engineer-iac-terraform-1354323.html
Experience: 0 - 1 years
Expected Salary: 6-12 LPA
Apply here:
https://hirist.tech/j/trademo-junior-devops-engineer-iac-terraform-1354323.html
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Greendzine Technologies is hiring for Web App Development Engineer
Experience: 0 - 1 years
Expected Salary: 3-5 LPA
Apply here:
https://careers.greendzine.in/jobs/Careers/395901000007540286/Web-App-Development-Engineer?source=CareerSite
Experience: 0 - 1 years
Expected Salary: 3-5 LPA
Apply here:
https://careers.greendzine.in/jobs/Careers/395901000007540286/Web-App-Development-Engineer?source=CareerSite
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Blinkit is hiring for Data Analyst
Expected Salary: 15-25 LPA
Apply here:
https://linkedin.com/jobs/view/3967861517/?alternateChannel=search
Expected Salary: 15-25 LPA
Apply here:
https://linkedin.com/jobs/view/3967861517/?alternateChannel=search
Linkedin
Blinkit hiring Data Analyst in Gurugram, Haryana, India | LinkedIn
Posted 8:05:47 AM. Position Overview: As a Data Analyst specializing in Inventory Management, you will be responsibleโฆSee this and similar jobs on LinkedIn.
class Solution {
public:
int minOperations(vector<int>& nums, int x, int y) {
int l = 0;
int r = ranges::max(nums);
while (l < r) {
const int m = (l + r) / 2;
if (isPossible(nums, x, y, m))
r = m;
else
l = m + 1;
}
return l;
}
private:
bool isPossible(const vector<int>& nums, int x, int y, int m) {
long long additionalOps = 0;
for (const int num : nums)
additionalOps += max(0LL, (num - 1LL * y * m + x - y - 1) / (x - y));
return additionalOps <= m;
}
};
Citadel โ
public:
int minOperations(vector<int>& nums, int x, int y) {
int l = 0;
int r = ranges::max(nums);
while (l < r) {
const int m = (l + r) / 2;
if (isPossible(nums, x, y, m))
r = m;
else
l = m + 1;
}
return l;
}
private:
bool isPossible(const vector<int>& nums, int x, int y, int m) {
long long additionalOps = 0;
for (const int num : nums)
additionalOps += max(0LL, (num - 1LL * y * m + x - y - 1) / (x - y));
return additionalOps <= m;
}
};
Citadel โ
bool isposs(vector<int>thr,vector<int>cost,int m,int budget){
int co=0;
for(int i=0;i<thr.size();i++){
if(thr[i]<m){
if((m-thr[i])%thr[i]==0)co+=((m-thr[i])/thr[i])*cost[i];
else
co+=(((m-thr[i])/thr[i])+1)*cost[i];
}
if(co>budget)return 0;
}
return 1;
}
int getMaximumThroughput(vector<int> throughput, vector<int> scaling_cost, int budget) {
priority_queue<int>pq;
int l=0;
// for(auto it:throughput)l=max(l,it);
int r=1e9;
int ans=0;
cout<<isposs(throughput,scaling_cost,6,budget);
while(l<=r){
int mid=(l+r)/2;
if(isposs(throughput,scaling_cost,mid,budget)){
l=mid+1;
ans=mid;
}
else r=mid-1;
}
return ans;
}
Citadel โ
int co=0;
for(int i=0;i<thr.size();i++){
if(thr[i]<m){
if((m-thr[i])%thr[i]==0)co+=((m-thr[i])/thr[i])*cost[i];
else
co+=(((m-thr[i])/thr[i])+1)*cost[i];
}
if(co>budget)return 0;
}
return 1;
}
int getMaximumThroughput(vector<int> throughput, vector<int> scaling_cost, int budget) {
priority_queue<int>pq;
int l=0;
// for(auto it:throughput)l=max(l,it);
int r=1e9;
int ans=0;
cout<<isposs(throughput,scaling_cost,6,budget);
while(l<=r){
int mid=(l+r)/2;
if(isposs(throughput,scaling_cost,mid,budget)){
l=mid+1;
ans=mid;
}
else r=mid-1;
}
return ans;
}
Citadel โ
โค1