Coin Change
Given a value N, find the number of ways to make change for N cents, if we have infinite supply of each of S = { S1, S2, .. , SM } valued coins.
Example 1:
Input:
n = 4 , m = 3
S[] = {1,2,3}
Output: 4
Explanation: Four Possible ways are:
{1,1,1,1},{1,1,2},{2,2},{1,3}.
Example 2:
Input:
n = 10 , m = 4
S[] ={2,5,3,6}
Output: 5
Explanation: Five Possible ways are:
{2,2,2,2,2}, {2,2,3,3}, {2,2,6}, {2,3,5}
and {5,5}.
Today question
Try to solve this question guys
It's very very important questions
These companies are asked in interview guys
Accolite Amazon Microsoft Morgan Stanley OYO Rooms Paytm Samsung Snapdeal Flipkart
Given a value N, find the number of ways to make change for N cents, if we have infinite supply of each of S = { S1, S2, .. , SM } valued coins.
Example 1:
Input:
n = 4 , m = 3
S[] = {1,2,3}
Output: 4
Explanation: Four Possible ways are:
{1,1,1,1},{1,1,2},{2,2},{1,3}.
Example 2:
Input:
n = 10 , m = 4
S[] ={2,5,3,6}
Output: 5
Explanation: Five Possible ways are:
{2,2,2,2,2}, {2,2,3,3}, {2,2,6}, {2,3,5}
and {5,5}.
Today question
Try to solve this question guys
It's very very important questions
These companies are asked in interview guys
Accolite Amazon Microsoft Morgan Stanley OYO Rooms Paytm Samsung Snapdeal Flipkart
๐1
In Infosys exam 1st problem is very very easy guys
And 2nd problem will be come on greedy algorithm
And 3d problem will be come on DP
https://www.youtube.com/watch?v=ARvQcqJ_-NY&list=PLfFeAJ-vQopt_S5XlayyvDFL_mi2pGJE3
And 2nd problem will be come on greedy algorithm
And 3d problem will be come on DP
https://www.youtube.com/watch?v=ARvQcqJ_-NY&list=PLfFeAJ-vQopt_S5XlayyvDFL_mi2pGJE3
๐MyAnatomy Off Campus Drive 2022 : Recruitment Freshers as Full Stack Developer With 7 LPA
*Job Role - Full Stack Developer
*Qualification - B.E/ B.Tech
*Batch - 2018, 2019, 2020, 2021 & 2022
*Salary - Rs 5 โ 7 LPA
https://fresherearth.blogspot.com/2022/04/MyAnatomy-Off-Campus-Drive-2022-Recruitment-Freshers-as-Full-Stack-Developer-With-7-LPA.html
โ Share with your friends
*Job Role - Full Stack Developer
*Qualification - B.E/ B.Tech
*Batch - 2018, 2019, 2020, 2021 & 2022
*Salary - Rs 5 โ 7 LPA
https://fresherearth.blogspot.com/2022/04/MyAnatomy-Off-Campus-Drive-2022-Recruitment-Freshers-as-Full-Stack-Developer-With-7-LPA.html
โ Share with your friends
FresherEarth - Get All Latest Jobs Here
MyAnatomy Off Campus Drive 2022 : Recruitment Freshers as Full Stack Developer With 7 LPA
fresher jobs, freshers jobs, off campus jobs, latest fresher jobs, fresher jobs bangalore, fresher jobs hyderabad, latest walk in drive
๐ฑ1
Hi! Keep reading this message if you are looking for a job and would like to build the future of digital payments, here is a golden opportunity.
NPCI, Indiaโs leading digital payments organisation is scouting for 250 Graduate Engineer Trainees (GET) who will join its team to build revolutionary digital payment products like UPI, RuPay, and FAStag.
It is a โLearn while you Earnโ opportunity where the GETs will pursue 1 year PG program from a reputed institution in addition to the salary package being offered to them. (*t&c apply)
Get ready to join this innovator's community and inspire the work. Have a great start to your career.
Last date to apply for this opportunity is April 28, 2022. Visit https://bit.ly/3Lc64AO.
Thank you.
NPCI, Indiaโs leading digital payments organisation is scouting for 250 Graduate Engineer Trainees (GET) who will join its team to build revolutionary digital payment products like UPI, RuPay, and FAStag.
It is a โLearn while you Earnโ opportunity where the GETs will pursue 1 year PG program from a reputed institution in addition to the salary package being offered to them. (*t&c apply)
Get ready to join this innovator's community and inspire the work. Have a great start to your career.
Last date to apply for this opportunity is April 28, 2022. Visit https://bit.ly/3Lc64AO.
Thank you.
Thoughtworks is hiring for Software Developer role.
CTC: 11 LPA
Batch eligible: 2020, 2021 and 2022 passouts(Female Only)
Apply Link: https://www.myamcat.com/jobs/description/software-developer-job-for-fresher-in-thoughtworks-in-bengaluru-gurgaon-pune/89875
CTC: 11 LPA
Batch eligible: 2020, 2021 and 2022 passouts(Female Only)
Apply Link: https://www.myamcat.com/jobs/description/software-developer-job-for-fresher-in-thoughtworks-in-bengaluru-gurgaon-pune/89875
Myamcat
Jobs in India | Job Vacancies in India | Job Opportunities in India
Find latest jobs in India. Search for best suitable job vacancies in India's top companies and apply for IT, MBA, finance, BPO, KPO & other jobs in India.
๐2
class GFG {
static int xorOfArray(int arr[], int n)
{
int xor_arr = 0;
for (int i = 0; i < n; i++) {
xor_arr = xor_arr ^ arr[i];
}
return xor_arr;
}
public static void main (String[] args)
{
int arr[] = { 3, 9, 12, 13, 15 };
int n = arr.length;
System.out.println(xorOfArray(arr, n));
}
}
XOR CODE
static int xorOfArray(int arr[], int n)
{
int xor_arr = 0;
for (int i = 0; i < n; i++) {
xor_arr = xor_arr ^ arr[i];
}
return xor_arr;
}
public static void main (String[] args)
{
int arr[] = { 3, 9, 12, 13, 15 };
int n = arr.length;
System.out.println(xorOfArray(arr, n));
}
}
XOR CODE
๐1
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <unordered_map>
using namespace std;
char B[105];
int main(){
int n;
int ans=0;
scanf("%d", &n);
scanf("%s", B);
for(int i=2; B[i]; i++){
if(B[i-2] == '0' && B[i-1] == '1' && B[i] == '0') B[i] = '1', ans++;
}
printf("%d", ans);
return 0;
}
Beautiful string code
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <unordered_map>
using namespace std;
char B[105];
int main(){
int n;
int ans=0;
scanf("%d", &n);
scanf("%s", B);
for(int i=2; B[i]; i++){
if(B[i-2] == '0' && B[i-1] == '1' && B[i] == '0') B[i] = '1', ans++;
}
printf("%d", ans);
return 0;
}
Beautiful string code
ArrayList<Integer> ar = new ArrayList<Integer>();
ArrayList<Integer> ar1 = new ArrayList<Integer>();
ArrayList<Integer> arr2= new ArrayList<Integer>();
ArrayList<Integer> sza= new ArrayList<Integer>();
ArrayList<Integer> p_n= new ArrayList<Integer>();
Scanner sc = new Scanner(System.in);
int a_size= sc.nextInt();
int m_size=sc.nextInt();
int[] a = new int[a_size];
for(int i=0;i<a_size;i++){
a[i]=sc.nextInt();
arr2.add(a[i]);
}
int[] p = new int[m_size];
for(int i=0;i<m_size;i++){
p[i]=sc.nextInt();
p_n.add(p[i]);
}
int[] sz=new int[m_size];
for(int i=0;i<m_size;i++){
sz[i]=sc.nextInt();
sza.add(sz[i]);
}
for(int i=0;i<a_size;i++)
{
for(int j=0;j<m_size;j++)
{
if(a[i]==p[j])
{
ar.add(p[j]);
}
}
}
int [] fr = new int [ar.size()];
int visited = -1;
for(int i = 0; i < ar.size(); i++){
int count = 1;
for(int j = i+1; j < ar.size(); j++){
if(ar.get(i).equals(ar.get(j))){
count++;
fr[j] = visited;
}
}
if(fr[i] != visited)
fr[i] = count;
}
for(int i = 0; i < fr.length; i++){
if(fr[i] != visited)
ar1.add(fr[i]);
}
ArrayList<Integer> pnew = new ArrayList<Integer>();
for(int l=0;l<sz.length;l++)
{
for(int h=0;h<sza.get(l);h++)
{
pnew.add(p_n.get(l));
}
}
int count=0;
for(int i = 0; i < pnew.size(); i++)
{
for(int j = i+1; j < pnew.size(); j++)
{
if(pnew.get(i).equals(pnew.get(j)))
{
count++;
}
}
}
System.out.println(count);
}
}
Sequences concatenation code
ArrayList<Integer> ar1 = new ArrayList<Integer>();
ArrayList<Integer> arr2= new ArrayList<Integer>();
ArrayList<Integer> sza= new ArrayList<Integer>();
ArrayList<Integer> p_n= new ArrayList<Integer>();
Scanner sc = new Scanner(System.in);
int a_size= sc.nextInt();
int m_size=sc.nextInt();
int[] a = new int[a_size];
for(int i=0;i<a_size;i++){
a[i]=sc.nextInt();
arr2.add(a[i]);
}
int[] p = new int[m_size];
for(int i=0;i<m_size;i++){
p[i]=sc.nextInt();
p_n.add(p[i]);
}
int[] sz=new int[m_size];
for(int i=0;i<m_size;i++){
sz[i]=sc.nextInt();
sza.add(sz[i]);
}
for(int i=0;i<a_size;i++)
{
for(int j=0;j<m_size;j++)
{
if(a[i]==p[j])
{
ar.add(p[j]);
}
}
}
int [] fr = new int [ar.size()];
int visited = -1;
for(int i = 0; i < ar.size(); i++){
int count = 1;
for(int j = i+1; j < ar.size(); j++){
if(ar.get(i).equals(ar.get(j))){
count++;
fr[j] = visited;
}
}
if(fr[i] != visited)
fr[i] = count;
}
for(int i = 0; i < fr.length; i++){
if(fr[i] != visited)
ar1.add(fr[i]);
}
ArrayList<Integer> pnew = new ArrayList<Integer>();
for(int l=0;l<sz.length;l++)
{
for(int h=0;h<sza.get(l);h++)
{
pnew.add(p_n.get(l));
}
}
int count=0;
for(int i = 0; i < pnew.size(); i++)
{
for(int j = i+1; j < pnew.size(); j++)
{
if(pnew.get(i).equals(pnew.get(j)))
{
count++;
}
}
}
System.out.println(count);
}
}
Sequences concatenation code
๐1