Amadeus Coding Questions & Answers 2024 | Amadeus Coding Questions | Amadeus Interview Questions and Answers | Amadeus Interview Questions
Amadeus Coding Questions & Answers 2024: The Company of Amadeus is hiring the various vacancies for eligible employees. Following of hiring, Amadeus Off Campus Drive 2024 for capable and eligible candidates. The selection process of Amadeus Hiring 2024 is Online Assessment Test, Interview Process, etc., Willing candidates eagerly prepare the interview process. Amadeus Coding Questions & Answers and Amadeus Interview Questions is available in this page. The Amadeus will conduct many selections process. so, for candidates prepare common questions. Amadeus Coding questions contains mostly common and repeated asked questions. So, Candidates hopefully prepare the Amadeus coding questions and answers.
The Amadeus Company published some sample Amadeus coding questions and answers/ Amadeus Interview questions in the official website. Interested candidates must prepare the Amadeus Selection Process. When you will be qualified in the selection process, they will get Amadeus Jobs. Candidates put your full efforts in the preparation of Amadeus Coding questions with Answers and Amadeus Coding Interview questions. Continuous preparation of Amadeus Coding questions and Answers, you definitely achieve the selection process. The Interview & test date will be intimated on mail. Keep check the mail.
Amadeus Coding Interview Questions
- Tell me about yourself
- Tell me about your daily day-to-day activities.
- Tell me about your Roles and Responsibilities
- Explain the OOP concepts used in your framework in detail.
- Why constructor was used in your framework
- Explain the differences between Method vs. constructor.
- A constructor can be static, isn’t it?
- Why constructor cannot be static?
- Explain the Handling of different drop-downs and write code.
- Explain the Handling of Child browser Window pop-ups.
- Explain the differences between Find Element and Find Elements.
- Explain all the Different Webdriver APIs available
- What is Web element
- Explain all the Different Webelement APIs available
- Explain the differences between Set and Map.
- Explain the differences between Interface vs. abstract class.
- Is Webdriver an interface? Are you sure?
- For any given string, write code to fetch and print the duplicate characters and print the duplicate count.
- Explain Exceptions faced in your project.
- How to handle stale element reference exception, explain with code.
- What is @Findby
- Explain the differences between / Vs //
- Types of locators available
- Explain Locator Strategy in your Project
- Why ID Locator is best
- How have you handled dynamic web elements?
- What is Action API in Selenium and its usage?
- Explain the Sprint process in your project and what ceremonies Sprint had in your project.
- Explain the differences between Assert and Verify.
- How to fetch attribute of Webelement
- How to handle multiple inheritance in Java
- How do you achieve multiple inheritance with Interface? Explain the approach.
- How to submit a form in Selenium Webdriver
- Have you worked on Jeb and Spock?
- Do you have any questions to ask me?
- Why TestNG Listeners are used in your Framework
- Which Listeners are used in your Project and Why?
- Why Maven and Log4J?
Amadeus Coding Questions & Solutions
Q) Problem Statement -: Street Lights are installed at every position along a 1-D road of length n. Locations[] (an array) represents the coverage limit of these lights. The ith light has a coverage limit of locations[i] that can range from the position max((i – locations[i]), 1) to min((i + locations[i]), n ) (Closed intervals). Initially all the lights are switched off. Find the minimum number of fountains that must be switched on to cover the road.
Example
n = 3
locations[] = {0, 2, 13}then
For position 1: locations[1] = 0, max((1 – 0),
1) to mini (1+0), 3) gives range = 1 to 1
For position 2: locations[2] = 2, max((2-2),
1) to min( (2+2), 3) gives range = 1 to 3
For position 3: locations[3] = 1, max( (3-1),
1) to min( (3+1), 3) gives range = 2 to 3
For the entire length of this road to be covered, only the light at position 2 needs to be activated.
Returns:
int : the minimum number of street lights that must be activated
Constraints :
- 1<_n<_ 10^5
- O<_locations[i] <_ mini (n,100) (where 1 <_1<_10^5)
Sample Input For Custom Testing :
3 ->locations[] size n = 3
1 ->locations[] [1, 1, 1]
1 ->Sample Output
Sample Output :
1
C++ PROGRAM
#include <bits/stdc++.h> #define ll long long using namespace std; bool compare(pair<int, int=""> A, pair<int, int=""> B) { if (A.first = B.first) return A.second < B.second; return A.first < B.first; } int solve(int location[], int n) { pair<int, int=""> range[n]; for (int i = 0; i < n; i++) { int id = i + 1; range[i].first = max(1, id – location[i]); range[i].second = min(n, id + location[i]); } sort(range, range + n, compare); int i = 0; int ans = 0; while (i < n) { pair<int, int=""> p = range[i]; ans++; while (i + 1 < n && range[i].first == range[i + 1].first) { p.second = max(p.second, range[i + 1].second); i++; } //cout<<p.second<<” “<<i<<endl;="" while="" (i="" <="" n="" &&="" range[i].second="" i++;="" cout<<p.second<<”="" }="" return="" ans;="" int="" main()="" {="" n;="" cin="">> n; int location[n]; for (int i = 0; i < n; i++) cin >> location[i]; cout << solve(location, n) << endl; return 0; }</p.second<<”></int,></int,></int,></int,> PYTHON PROGRAM
def Sort_Tuple(tup): # getting length of list of tuples lst = len(tup) for i in range(0, lst): for j in range(0, lst-i-1): if (tup[j][1] > tup[j + 1][1]): temp = tup[j] tup[j]= tup[j + 1] tup[j + 1]= temp return tup def solve(l,n): rang=[[0,0]for i in range(n)] #print(rang) for i in range(n): id=i+1 rang[i][0]=max(1,id-l[i]) rang[i][1]=min(n,id+l[i]) Sort_Tuple((rang)) i=0 ans=0 while ip[1]: break i+=1 return ans n=int(input()) l=[] for i in range(n): l.append(int(input())) print(solve(l,n)) JAVA PROGRAM
import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; class Pair{ Integer a; Integer b; Pair(){ } Pair(Integer a,Integer b){ this.a=a; this.b=b; } public Integer getA() { return a; } public void setA(Integer a) { this.a = a; } public Integer getB() { return b; } public void setB(Integer b) { this.b = b; } } class SortingPair implements Comparator{ @Override public int compare(Pair o1, Pair o2) { if(o1.getA()==o2.getA()) { if(o1.getB() < o2.getB()) { return 1; }else { return 0; } } if(o1.getA()< o2.getA()) { return 1; }else { return 0; } } } public class Application2 { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int location[]=new int[n]; for(int i=0;i< n;i++) { location[i]=sc.nextInt(); } System.out.println(solve(location,n)); } private static int solve(int[] location, int n) { Pair range[] = new Pair[n]; for(int i=0;i< n;i++) { int id=i+1; range[i] = new Pair(); range[i].setA(Math.max(1, id-location[i])); range[i].setB(Math.min(n, id+location[i])); } Arrays.sort(range,new SortingPair()); int i=0,ans=0; while(i< n) { Pair p=range[i]; ans++; while(i+1< n && range[i].getA()==range[i+1].getA()) { p.b=Math.max(p.getB(), range[i+1].getB()); i++; } while(i< n && range[i].getB()<=p.getB()) { i++; } } return ans; } }
Q) Problem Statement -: You are given an array, You have to choose a contiguous subarray of length ‘k’, and find the minimum of that segment, return the maximum of those minimums.
Sample input 0
1 → Length of segment x =1
5 → size of space n = 5
1 → space = [ 1,2,3,1,2]
2
3
1
2
Sample output
3
Explanation
The subarrays of size x = 1 are [1],[2],[3],[1], and [2],Because each subarray only contains 1 element, each value is minimal with respect to the subarray it is in. The maximum of these values is 3. Therefore, the answer is 3
C++ PROGRAM
#include<bits/stdc++.h> using namespace std; vector arr; int prevmin=-1; int flag=0; int x,n,q; int sorting(int start,int end) { if(start+1==n) {start=0;end=end-n;} if(start==end) return arr[start]; return min(arr[start],sorting(start+1,end)); } int func(int start,int end) { if(flag==0) {flag++;return prevmin=sorting(start,end);} if(arr[start-1]==prevmin) return prevmin; return prevmin=(arr[end]<=prevmin)?prevmin:sorting(start,end); } int main() { cin>>x>>n; int ans=0; for(int i=0;i<n;i++) {cin="">>q;arr.push_back(q);} for(int i=0;i< n;i++) { ans=max(ans,func(i,i+x-1)); } cout<< ans; }</n;i++)> PYTHON PROGRAM
s=int(input()) n=int(input()) a=[] for i in range(n): a.append(int(input())) def min_in_segment(start,end,prev,s,prev_min): if s==1: return a[start] else: if prev==-1 or prev_min==-2: return min(a[start:end+1]) elif prev_min!=-2: if prev!=prev_min: if a[end] JAVA PROGRAM
import java.util.*; class DiskSpace { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int x=sc.nextInt(); int n=sc.nextInt(); int arr[]=new int[n]; for(int i=0;i< n;i++) arr[i]=sc.nextInt(); int min=Integer.MAX_VALUE; int max=Integer.MIN_VALUE; for(int i=0;i<=n-x;i++) { min=Integer.MAX_VALUE; for(int j=i;j<(i+x);j++) min=Math.min(min,arr[j]); max=Math.max(min,max); } System.out.println(max); } }
Q) Problem Statement -: A taxi can take multiple passengers to the railway station at the same time.On the way back to the starting point,the taxi driver may pick up additional passengers for his next trip to the airport.A map of passenger location has been created,represented as a square matrix.
The Matrix is filled with cells,and each cell will have an initial value as follows:
- A value greater than or equal to zero represents a path.
- A value equal to 1 represents a passenger.
- A value equal to -1 represents an obstruction.
The rules of motion of taxi are as follows:
- The Taxi driver starts at (0,0) and the railway station is at (n-1,n-1).Movement towards the railway station is right or down,through valid path cells.
- After reaching (n-1,n-1) the taxi driver travels back to (0,0) by travelling left or up through valid path cells.
- When passing through a path cell containing a passenger,the passenger is picked up.once the rider is picked up the cell becomes an empty path cell.
- If there is no valid path between (0,0) and (n-1,n-1),then no passenger can be picked.
- The goal is to collect as many passengers as possible so that the driver can maximize his earnings.
For example consider the following grid,
0 1
-1 0
Start at top left corner.Move right one collecting a passenger. Move down one to the destination.Cell (1,0) is blocked,So the return path is the reverse of the path to the airport.All Paths have been explored and one passenger is collected.
Returns:
Int : maximum number of passengers that can be collected.
Sample Input 0
4 -> size n = 4
4 -> size m = 4
0 0 0 1 -> mat
1 0 0 0
0 0 0 0
0 0 0 0
Output 0
2
Explanation 0
The driver can contain a maximum of 2 passengers by taking the following path (0,0) → (0,1) → (0,2) → (0,3) → (1,3) → (2,3) → (3,3) → (3,2) → (3,1) → (3,0) → (2,0) → (1,0) → (0,0)
Sample Input 1
STD IN Function
———— ————-
3 → size n=3
3 → size m=3
0 1 -1 → mat
1 0 -1
1 1 1
Sample Output 1
5
Explanation 1
The driver can contain a maximum of 5 passengers by taking the following path (0,0) → (0,1) → (1,1) → (2,1) → (2,2) → (2,1) → (2,0) → (1,0) → (0,0)
C++ PROGRAM
#include <bits/stdc++.h> using namespace std; int n, m; int mat[105][105]; map<pair<int, pair<int,="" int="">>, int> dp; bool isValid(int i, int j) { if (mat[i][j] == –1) return false; if (i < 0 || i >= n) return false; if (j < 0 || j >= m) return false; return true; } int solve(int i, int j, int x, int y) { if (!isValid(i, j)) { return INT_MIN; } if (!isValid(x, y)) { return INT_MIN; } if (i == n – 1 && x == n – 1 && j == m – 1 && y == m – 1) { if (mat[i][j] == 1) { return 1; } else { return 0; } } if (dp.find({i, {j, x}}) != dp.end()) return dp[{i, {j, x}}]; int cur = 0; if (i == x && j == y) { if (mat[i][j] == 1) cur = 1; } else { if (mat[i][j] == 1) cur++; if (mat[x][y] == 1) cur++; } int op1 = solve(i + 1, j, x + 1, y); int op2 = solve(i, j + 1, x, y + 1); int op3 = solve(i + 1, j, x, y + 1); int op4 = solve(i, j + 1, x + 1, y); int ans = cur + max(op1, max(op2, max(op3, op4))); return dp[{i, {j, x}}] = ans; } int main() { cin >> n >> m; for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) cin >> mat[i][j]; int ans = solve(0, 0, 0, 0); if (ans >= 0) cout << solve(0, 0, 0, 0) << endl; else cout << –1 << endl; return 0; }</pair<int,>
JAVA PROGRAM
import java.util.*; class Solution { public static int cost(int grid[][], int row1, int col1,int row2, int col2) { if (row1 == row2 && col1 == col2) { if (grid[row1][col1] == 1) return 1; return 0; } int ans = 0; if (grid[row1][col1] == 1) ans++; if (grid[row2][col2] == 1) ans++; return ans; } public static int solve(int n, int m, int grid[][],int dp[][][], int row1,int col1, int row2) { int col2 = (row1 + col1) - (row2); if (row1 == n - 1 && col1 == m - 1 &&row2 == n - 1 && col2 == m - 1) return 0; if (row1 >= n || col1 >= m ||row2 >= n || col2 >= m) return -1 * Integer.MAX_VALUE; if (dp[row1][col1][row2] != -1) return dp[row1][col1][row2]; int ch1 = -1 * Integer.MAX_VALUE, ch2 = -1 * Integer.MAX_VALUE; int ch3 = -1 * Integer.MAX_VALUE, ch4 = -1 * Integer.MAX_VALUE; if (grid[row1][col1 + 1] != -1 && grid[row2 + 1][col2] != -1) ch1 = cost(grid, row1, col1 + 1, row2 + 1, col2) + solve(n, m, grid, dp, row1, col1 + 1, row2 + 1); if (grid[row1][col1 + 1] != -1 && grid[row2][col2 + 1] != -1) ch2 = cost(grid, row1, col1 + 1, row2, col2 + 1) +solve(n, m, grid, dp, row1, col1 + 1, row2); if (grid[row1 + 1][col1] != -1 && grid[row2][col2 + 1] != -1) ch3 = cost(grid, row1 + 1, col1, row2, col2 + 1) +solve(n, m, grid, dp, row1 + 1, col1, row2); if (grid[row1 + 1][col1] != -1 && grid[row2 + 1][col2] != -1) ch4 = cost(grid, row1 + 1, col1, row2 + 1, col2) +solve(n, m, grid, dp, row1 + 1, col1, row2 + 1); return dp[row1][col1][row2] = Math.max(ch1, Math.max(ch2, Math.max(ch3, ch4))); } public static void initializeDp(int dp[][][],int item) { for(int i=0;i<5;i++) { for(int j=0;j<5;j++) for(int k=0;k<5;k++) dp[i][j][k]=item; } } public static int collectMax(int n,int m,int grid[][]) { int ans=0; int dp[][][]=new int[6][6][6]; initializeDp(dp,-1); if (grid[n - 1][m - 1] == -1 || grid[0][0] == -1) ans = -1 * Integer.MAX_VALUE; if (grid[0][0] == 1) ans++; grid[0][0] = 0; if (grid[n - 1][m - 1] == 1) ans++; grid[n - 1][m - 1] = 0; ans += solve(n, m, grid, dp, 0, 0, 0); return Math.max(ans, 0); } public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int m=sc.nextInt(); int arr[][]=new int[n+1][m+1]; for(int i=0;i
JOB ALERT ON INSTAGRAM | FOLLOW NOW>> |
JOB ALERT ON YOUR EMAIL DAILY | SUBSCRIBE NOW>> |
The Amadeus Coding Questions with Solutions is downloading easily and also prepare more conveniently in this page. Kindly watch Dailyrecruitment.in site for more information updates about jobs and Education.
Govt Jobs by Qualifications
Education & Vacancies | Salary | Apply Link |
---|---|---|
12th Pass Govt Jobs - 18,000+ Vacancies | Rs. 5,200 - 92,300 | Apply Now |
ITI Pass Jobs - 3,500 Vacancies | Rs. 5,200 - 35,000 | Apply Now |
Any Graduate Jobs - 19,100 Vacancies | Rs. 5,200 - 92,300 | Apply Now |
Central Govt Jobs | Rs. 5,200 - 17,000 | Apply Now |
Bank Jobs - 1,000 Vacancies | Rs. 5,200 - 29,200 | Apply Now |
Diploma Jobs - 9,300 Vacancies | Rs. 5,200 - 35,000 | Apply Now |
BTech/BE Jobs - 18,000 Vacancies | Rs. 15,000 - 1,00,000 | Apply Now |
Data Entry Jobs - 1,300 Vacancies | Rs. 5,200 - 29,200 | Apply Now |
Private Jobs | Rs. 10,000 - 67,700 | Apply Now |