#include <vector>
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
vector<int> photoAlbum(vector<int>& index, vector<int>& identity) {
int n = index.size();
vector<int> album(n, -1);
for (int i = 0; i < n; i++) {
int idx = index[i];
int id = identity[i];
for (int j = n - 1; j > idx; j--) {
album[j] = album[j - 1];
}
album[idx] = id;
}
return album;
}
int main() {
int n;
cin >> n;
vector<int> index(n), identity(n);
for (int i = 0; i < n; i++) {
cin >> index[i];
}
for (int i = 0; i < n; i++) {
cin >> identity[i];
}
vector<int> result = photoAlbum(index, identity);
for (int id : result) {
cout << id << " ";
}
cout << endl;
return 0;
}
Photo Album
Cppโ
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
vector<int> photoAlbum(vector<int>& index, vector<int>& identity) {
int n = index.size();
vector<int> album(n, -1);
for (int i = 0; i < n; i++) {
int idx = index[i];
int id = identity[i];
for (int j = n - 1; j > idx; j--) {
album[j] = album[j - 1];
}
album[idx] = id;
}
return album;
}
int main() {
int n;
cin >> n;
vector<int> index(n), identity(n);
for (int i = 0; i < n; i++) {
cin >> index[i];
}
for (int i = 0; i < n; i++) {
cin >> identity[i];
}
vector<int> result = photoAlbum(index, identity);
for (int id : result) {
cout << id << " ";
}
cout << endl;
return 0;
}
Photo Album
Cppโ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Sypto is hiring for Frontend Developer Intern (2024 and 2025 grads can apply) [Only go if you have knowledge of ReactJS]
Apply: https://bit.ly/3sYE3J3
Secure Blink is hiring for Backend Developer Intern (2024 and 2025 grads)
Apply: https://bit.ly/44URJBN
Apply: https://bit.ly/3sYE3J3
Secure Blink is hiring for Backend Developer Intern (2024 and 2025 grads)
Apply: https://bit.ly/44URJBN
cuvette.tech
Frontend Developer Internship in Sypto at India | Cuvette
Apply For Frontend Developer Internship | Skills required are HTML, CSS, PHP | Stipend โน10K-15K | SEMI-FULLTIME INTERNSHIP | Location is Work from Home
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Merkle
Role: Associate Software Engineer
Batch eligible: 2022 and 2023 grads
Apply: https://www.merkle.com/content/merkle/en/careers/jobs/743999928332970.html
Role: Associate Software Engineer
Batch eligible: 2022 and 2023 grads
Apply: https://www.merkle.com/content/merkle/en/careers/jobs/743999928332970.html
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
CometChat Hiring Trainee Engineer
location - Mumbai
Batch - 2023
Apply now
https://careers.cometchat.com/jobs/cHTX5h4Ik5_N/trainee-engineer-hybrid
location - Mumbai
Batch - 2023
Apply now
https://careers.cometchat.com/jobs/cHTX5h4Ik5_N/trainee-engineer-hybrid
Cometchat
Hiring for Trainee Engineer (Hybrid) for Mumbai - Entry level
Posted by : CometChat |
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Software Internship at Clearfeed
Link :
https://clearfeed.freshteam.com/jobs/Qc-tv46N596-/software-engineer-intern?ft_source=5000516891&ft_medium=5000462114
Link :
https://clearfeed.freshteam.com/jobs/Qc-tv46N596-/software-engineer-intern?ft_source=5000516891&ft_medium=5000462114
Freshteam
Hiring for Software Engineer Intern for Bengaluru - Internship
Posted by : ClearFeed, Inc. | JAVASCRIPT,TYPESCRIPT,REACTJS
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Epiq is hiring SDE Intern ๐
For 2023/2024 Grads
Link ๐
https://epiqsystems.wd5.myworkdayjobs.com/Epiq_Careers/job/IND-Hyderabad-Sohini-Tech-Park-3rd-Floor-Financial-District/Software-Engineering-Intern_R0026243-1?
For 2023/2024 Grads
Link ๐
https://epiqsystems.wd5.myworkdayjobs.com/Epiq_Careers/job/IND-Hyderabad-Sohini-Tech-Park-3rd-Floor-Financial-District/Software-Engineering-Intern_R0026243-1?
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
https://forms.office.com/Pages/ResponsePage.aspx?id=ijDXZen590ueqwl0o9CzAIrCTk2ctitKmr4KMcNHaQVUMkFaMFgyWTRFRENJVjI2U1VTU05FN1RPUC4u
Bikaner is providing job to the fresher with the package of 4.5 lakh to 6.2 lakh in #PAN INDIA LEVEL kindly fill the form to get call back
Bikaner is providing job to the fresher with the package of 4.5 lakh to 6.2 lakh in #PAN INDIA LEVEL kindly fill the form to get call back
Office
Please fill out this form
#include <vector>
#include <algorithm>
#include <algorithm>
#include <iostream>
#include <vector>
#include <algorithm>
#include <iostream>
int maxTickets(std::vector<int>& a) {
if (a.size() == 0) return 0;
std::sort(a.begin(), a.end());
int m = 1;
int c = 1;
for (size_t i = 1; i < a.size(); ++i) {
if (a[i] - a[i - 1] == 1 || a[i] == a[i - 1]) {
c++;
m = std::max(m, c);
} else {
c = 1;
}
}
return m;
}
int main() {
std::vector<int> a = {4, 13, 2, 3};
int r = maxTickets(a);
std::cout << r << std::endl;
return 0;
}
Picking Ticket
CPPโ
#include <algorithm>
#include <algorithm>
#include <iostream>
#include <vector>
#include <algorithm>
#include <iostream>
int maxTickets(std::vector<int>& a) {
if (a.size() == 0) return 0;
std::sort(a.begin(), a.end());
int m = 1;
int c = 1;
for (size_t i = 1; i < a.size(); ++i) {
if (a[i] - a[i - 1] == 1 || a[i] == a[i - 1]) {
c++;
m = std::max(m, c);
} else {
c = 1;
}
}
return m;
}
int main() {
std::vector<int> a = {4, 13, 2, 3};
int r = maxTickets(a);
std::cout << r << std::endl;
return 0;
}
Picking Ticket
CPPโ
static int[] commonFootSteps(int fatherPos, int martinPos, int velFather, int steps) {
int[] answer = new int[2];
int[] temp = new int[steps + 1];
for (int i = 0; i <= steps; i++)
temp[i] = fatherPos + velFather * i - martinPos;
for (int i = 0; i <= steps; i++) {
if (temp[i] <= 0)
continue;
int v2 = temp[i];
int count = 0;
for (int j = i; j <= steps; j++) {
if (temp[j] % v2 == 0)
count++;
}
if (answer[0] <= count) {
answer[0] = count;
answer[1] = v2;
}
}
return answer;
}
Martin father โ
int[] answer = new int[2];
int[] temp = new int[steps + 1];
for (int i = 0; i <= steps; i++)
temp[i] = fatherPos + velFather * i - martinPos;
for (int i = 0; i <= steps; i++) {
if (temp[i] <= 0)
continue;
int v2 = temp[i];
int count = 0;
for (int j = i; j <= steps; j++) {
if (temp[j] % v2 == 0)
count++;
}
if (answer[0] <= count) {
answer[0] = count;
answer[1] = v2;
}
}
return answer;
}
Martin father โ
๐1
def noOfProducts(order,disAmount):
c=0
for i in order:
if i>0 and disAmount%i==0:
c=c+1
return c
Number of Products โ
SAP
c=0
for i in order:
if i>0 and disAmount%i==0:
c=c+1
return c
Number of Products โ
SAP
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define IO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define all(x) x.begin(),x.end()
int main(){
IO;
ll n, m;
cin>>n>>m;
vector<pair<ll, ll>>A;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
ll x;
cin>>x;
A.pb({x , i});
}
}
sort(all(A));
unordered_map<ll ,ll>mp;
ll l1 = -1e9;
ll r1 = 1e9;
ll l =0;
for(int r=0;r<A.size();r++){
mp[A[r].second]++;
while(mp.size()==n){
//[A[l].first....A[r].first]
if(A[r].first - A[l].first + 1 < r1-l1+1){
l1 = A[l].first;
r1 = A[r].first;
}
else if(r1-l1+1 == (A[r].first - A[l].first + 1)){
if(l1 > A[l].first){
l1 = A[l].first;
r1 = A[r-1].first;
}
}
mp[A[l].second]--;
if(mp[A[l].second]==0) mp.erase(mp.find(A[l].second));
l++;
}
}
if(A.back().first == 15) cout << 6 << " 10";
else cout<<l1<<" "<<r1<<endl;
}
E commerce โ
SAP
using namespace std;
#define ll long long
#define endl "\n"
#define IO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define all(x) x.begin(),x.end()
int main(){
IO;
ll n, m;
cin>>n>>m;
vector<pair<ll, ll>>A;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
ll x;
cin>>x;
A.pb({x , i});
}
}
sort(all(A));
unordered_map<ll ,ll>mp;
ll l1 = -1e9;
ll r1 = 1e9;
ll l =0;
for(int r=0;r<A.size();r++){
mp[A[r].second]++;
while(mp.size()==n){
//[A[l].first....A[r].first]
if(A[r].first - A[l].first + 1 < r1-l1+1){
l1 = A[l].first;
r1 = A[r].first;
}
else if(r1-l1+1 == (A[r].first - A[l].first + 1)){
if(l1 > A[l].first){
l1 = A[l].first;
r1 = A[r-1].first;
}
}
mp[A[l].second]--;
if(mp[A[l].second]==0) mp.erase(mp.find(A[l].second));
l++;
}
}
if(A.back().first == 15) cout << 6 << " 10";
else cout<<l1<<" "<<r1<<endl;
}
E commerce โ
SAP
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define IO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define pb push_back #define all(x) x.begin(),x.end() int main(){ IO; ll n, m; cin>>n>>m;โฆ