n = int(input())
A = int(input())
A1 = []
A2= []
A3= []
ans = 0
for i in range(n):
A1.append(int(input()))
for j in range(n):
A2.append(int(input()))
for k in range(n):
A2.append([p[k], b[k]])
a.sort()
for z in a:
if a[0] > N:
break
N += a[1]
ans += 1
print(ans)
Python 3
Follow @work4freshers
A = int(input())
A1 = []
A2= []
A3= []
ans = 0
for i in range(n):
A1.append(int(input()))
for j in range(n):
A2.append(int(input()))
for k in range(n):
A2.append([p[k], b[k]])
a.sort()
for z in a:
if a[0] > N:
break
N += a[1]
ans += 1
print(ans)
Python 3
Follow @work4freshers
π12
Sec 2 - techinal ability
Q1) median of terms
7
C
Q2) avarege of eleven
20
B
Q3) x y means
N p $
C
Q4) Five brothers
B
Muliplex
Q5) harsh
4 days
A
Q6) a fruit
1900
C
Q7) if m n
East
B
Q8) if the second
S
D
Infosys exam Answer
Q1) median of terms
7
C
Q2) avarege of eleven
20
B
Q3) x y means
N p $
C
Q4) Five brothers
B
Muliplex
Q5) harsh
4 days
A
Q6) a fruit
1900
C
Q7) if m n
East
B
Q8) if the second
S
D
Infosys exam Answer
π5
Number Of Subsequences Code For Infosys
int A[] = {10,13,7,8,14,11};
int n = 6;
int memo[6];//initialized with -1s;
int count(int currIndex){
if (currIndex == n-1) return 1;
if (memo[currIndex] != -1) return memo[currIndex];
int res = 0;
for (int i=currIndex+1 ; i<n ; i++){
if (abss(A[currIndex] - A[i]) <= 3){
res += count(i);
}
}
memo[currIndex] = res;
return res;
}
c++
int A[] = {10,13,7,8,14,11};
int n = 6;
int memo[6];//initialized with -1s;
int count(int currIndex){
if (currIndex == n-1) return 1;
if (memo[currIndex] != -1) return memo[currIndex];
int res = 0;
for (int i=currIndex+1 ; i<n ; i++){
if (abss(A[currIndex] - A[i]) <= 3){
res += count(i);
}
}
memo[currIndex] = res;
return res;
}
c++
π5
// Infosys
// N flowers on a Recatangular pana
int ans = 100000000;
void solve(vector<int> a, int n, int k, int index, int sum,
int maxsum)
{
if (k == 1)
{
maxsum = max(maxsum, sum);
sum = 0;
for (int i = index; i < n; i++)
{
sum += a[i];
}
maxsum = max(maxsum, sum);
ans = min(ans, maxsum);
return;
}
sum = 0;
for (int i = index; i < n; i++)
{
sum += a[i];
maxsum = max(maxsum, sum);
solve(a, n, k - 1, i + 1, sum, maxsum);
}
}
int GetMaxBeauty(int N, int K, vector<int> A)
{
solve(A, N, K, 0, 0, 0);
return ans;
}
// N flowers on a Recatangular pana
int ans = 100000000;
void solve(vector<int> a, int n, int k, int index, int sum,
int maxsum)
{
if (k == 1)
{
maxsum = max(maxsum, sum);
sum = 0;
for (int i = index; i < n; i++)
{
sum += a[i];
}
maxsum = max(maxsum, sum);
ans = min(ans, maxsum);
return;
}
sum = 0;
for (int i = index; i < n; i++)
{
sum += a[i];
maxsum = max(maxsum, sum);
solve(a, n, k - 1, i + 1, sum, maxsum);
}
}
int GetMaxBeauty(int N, int K, vector<int> A)
{
solve(A, N, K, 0, 0, 0);
return ans;
}
π2
array AR of size N
perfect_sum(arr, s, result) :
x = [0]*len(arr)
j = len(arr) - 1
while (s > 0) :
x[j] = s % 2
s = s // 2
j -= 1
sum = 0
for i in range(len(arr)) :
if (x[i] == 1) :
sum += arr[i]
if (sum == result) :
print("{",end="");
for i in range(len(arr)) :
if (x[i] == 1) :
print(arr[i],end= ", ");
print("}, ",end="")
def print_subset(arr, K) :
x = pow(2, len(arr))
for i in range(1, x):
perfect_sum(arr, i, K)
# Driver code
arr = [ ]
n = int(input("Enter length of array : "))
s=int(input("Enter sum : "))
for i in range(n):
ele=int(input("Enter element : "))
arr.append(ele)
print_subset(arr, s)
Python
perfect_sum(arr, s, result) :
x = [0]*len(arr)
j = len(arr) - 1
while (s > 0) :
x[j] = s % 2
s = s // 2
j -= 1
sum = 0
for i in range(len(arr)) :
if (x[i] == 1) :
sum += arr[i]
if (sum == result) :
print("{",end="");
for i in range(len(arr)) :
if (x[i] == 1) :
print(arr[i],end= ", ");
print("}, ",end="")
def print_subset(arr, K) :
x = pow(2, len(arr))
for i in range(1, x):
perfect_sum(arr, i, K)
# Driver code
arr = [ ]
n = int(input("Enter length of array : "))
s=int(input("Enter sum : "))
for i in range(n):
ele=int(input("Enter element : "))
arr.append(ele)
print_subset(arr, s)
Python
π5β€2
Organization: HBC
Job Title: Trainee
Salary: 3.2LPA (Expected)
Location: Bangalore
Job Type: Full time
Experience: 0 β 2 Years
Batch: 2022/21/20/19/18
Apply Now : https://work4freshers.com/hbc-off-campus-drive-2022-fresher-trainee/
Job Title: Trainee
Salary: 3.2LPA (Expected)
Location: Bangalore
Job Type: Full time
Experience: 0 β 2 Years
Batch: 2022/21/20/19/18
Apply Now : https://work4freshers.com/hbc-off-campus-drive-2022-fresher-trainee/
π5
Organization: Bosch Global Software
Job Title: Trainee
Salary: 5 LPA (Expected)
Location: Bangalore, Coimbatore, Hyderabad & Pune
Job Type: Full time
Experience: 0 β 2 Years
Batch: 2022
Apply Now: https://work4freshers.com/bosch-global-software-recruitment/
Job Title: Trainee
Salary: 5 LPA (Expected)
Location: Bangalore, Coimbatore, Hyderabad & Pune
Job Type: Full time
Experience: 0 β 2 Years
Batch: 2022
Apply Now: https://work4freshers.com/bosch-global-software-recruitment/
work4freshers - Your Job helper
Bosch Global Software Recruitment | Freshers | Apply Now - work4freshers
Bosch Global Software Off-Campus 2022 for the post of Trainee. Students from various disciplines can apply for Bosch Global Software Recruitment 2022.
β€2π2
Organization: Reliance Jio
Job Title: Graduate Engineer Trainee
Salary: 4.5 LPA (Expected)
Location: Mumbai
Job Type: Full time
Experience: 0 β 2 Years
Batch: 2022
Apply Now: https://work4freshers.com/reliance-jio-off-campus-drive-2022-graduate-engineer-trainee-mumbai/
Job Title: Graduate Engineer Trainee
Salary: 4.5 LPA (Expected)
Location: Mumbai
Job Type: Full time
Experience: 0 β 2 Years
Batch: 2022
Apply Now: https://work4freshers.com/reliance-jio-off-campus-drive-2022-graduate-engineer-trainee-mumbai/
work4freshers
Reliance Jio Off Campus Drive 2023 | Graduate Engineer Trainee |Mumbai |Apply Now work4freshers
Reliance Jio Off-Campus Drive 2022 for the post of Graduate Engineer Trainee. Students from various disciplines can apply for Reliance Jio Recruitment 2022.
π1
Organization: Yash Technologies
Job Title: Software Engineer Java
Salary: 6.5 LPA (Expected)
Location: Pune
Job Type: Full time
Experience: 0 β 2 Years
Batch: 2017/ 18/ 19/ 20/ 21/ 22
Apply Now: https://work4freshers.com/yash-technologies-off-campus-2022/
Job Title: Software Engineer Java
Salary: 6.5 LPA (Expected)
Location: Pune
Job Type: Full time
Experience: 0 β 2 Years
Batch: 2017/ 18/ 19/ 20/ 21/ 22
Apply Now: https://work4freshers.com/yash-technologies-off-campus-2022/
work4freshers - Your Job helper
Yash Technologies Off Campus 2022 Hiring Software Engineer | Apply Now - work4freshers
Yash Technologies Off Campus Drive 2022 for the post of Software Engineer Java. The students from various disciplines can apply for Yash Technologies Recruitment 2022
π7β€1
Organization: Oracle
Job Title: Technical Analyst 1-Support
Salary: 7 LPA (Expected)
Location: Bengaluru
Job Type: Full time
Experience: 0 β 2 Years
Batch: 2022/21/20/19/18
Apply Now: https://work4freshers.com/oracle-off-campus-drive-2022-technical-analyst/
Job Title: Technical Analyst 1-Support
Salary: 7 LPA (Expected)
Location: Bengaluru
Job Type: Full time
Experience: 0 β 2 Years
Batch: 2022/21/20/19/18
Apply Now: https://work4freshers.com/oracle-off-campus-drive-2022-technical-analyst/
work4freshers - Your Job helper
Oracle Off Campus Drive 2022 | Technical Analyst Support | Bengaluru | Apply Now - work4freshers
Oracle Off-Campus Drive 2022 for the post of Technical Analyst 1-Support. Students from various disciplines can apply for Oracle Recruitment 2022.
π3
Organization: Freshworks
Job Title; Graduate Trainee
Salary; 5 LPA (Expected)
Location; Chennai
Job Type: Full time
Experience: 0 β 2 Years
Batch; 2021/2022/2023
Apply now; https://work4freshers.com/freshworks-hiring-graduate-trainee/
Job Title; Graduate Trainee
Salary; 5 LPA (Expected)
Location; Chennai
Job Type: Full time
Experience: 0 β 2 Years
Batch; 2021/2022/2023
Apply now; https://work4freshers.com/freshworks-hiring-graduate-trainee/
work4freshers
Freshworks hiring Graduate Trainee | Full time | Freshers work4freshers
Freshworks Off Campus Drive 2022 for the post of Graduate Trainee. The students from various disciplines can apply for Freshworks Recruitment 2022
π4
Organization: JPMorgan Chase & Co.
Job Title: Software Engineer
Salary: 10 LPA (Expected)
Location: Bangalore
Job Type: Full time
Experience: 0 β 2 Years
Batch: 17/18/19/20/21/2022
Apply Now: https://work4freshers.com/jpmorgan-off-campus-drive-2022-software-engineer/
Job Title: Software Engineer
Salary: 10 LPA (Expected)
Location: Bangalore
Job Type: Full time
Experience: 0 β 2 Years
Batch: 17/18/19/20/21/2022
Apply Now: https://work4freshers.com/jpmorgan-off-campus-drive-2022-software-engineer/
work4freshers - Your Job helper
JPMorgan Off Campus Drive 2022 | Software Engineer | Bangalore - work4freshers
JPMorgan Chase & Co. Off-Campus Drive 2022 for the post of Software Engineer. Students from various disciplines can apply for JPMorgan Chase & Co. Recruitment 2022.
π2β€1
Organization: Boeing
Job Title: Associate Mechanical Design & Analysis Engineer
Salary: 8 LPA (Expected)
Location: Bangalore
Job Type: Full time
Experience; 0 β 2 Years
Batch: 2022/21/20/19/18/17
Apply Now:https://work4freshers.com/boeing-recruitment-associate-mechanical-design/
Job Title: Associate Mechanical Design & Analysis Engineer
Salary: 8 LPA (Expected)
Location: Bangalore
Job Type: Full time
Experience; 0 β 2 Years
Batch: 2022/21/20/19/18/17
Apply Now:https://work4freshers.com/boeing-recruitment-associate-mechanical-design/
work4freshers - Your Job helper
Boeing Recruitment | Associate Mechanical Design & Analysis Engineer | Apply Now - work4freshers
Boeing Off-Campus Drive 2022 for the post of Associate Mechanical Design & Analysis Engineer. Students from various disciplines can apply for Boeing Recruitment 2022.
π1