Infosys System Engineer Interview Experience - 4
Company : Infosys
Date : 6th Dec 2021
Branch : IT
Duration : 25 mins
Q1. Explain about your project.
1.Project Introduction
Give an introduction of your project, what problem you tried to solve with your project.
2.Modules Description:
Divide your project in various modules and describe modules to the interviewer.
3.Advantages and main functionality of your project
describe your main functionality of the project and main problem you want to solve.
4.Tools,Technologies and platform used
This is also a very important aspect when explaining a project. Tools, Technologies, and platforms used will help the interviewer understand better about the working of the project. As well as it will create an impact on how new is your project. Try to explain it very short and be to the point.
5.Personal Contribution in the project
Interviewer is interested to know what have you done in the project and what part you have worked on.
Q2. Define different OOPS Concepts.
Inheritance - When one object acquires all the properties and behaviors of a parent object, it is known as inheritance. It provides code reusability. It is used to achieve runtime polymorphism.
Encapsulation - Binding (or wrapping) code and data together into a single unit are known as encapsulation. For example, a capsule, it is wrapped with different medicines.
Polymorphism - If one task is performed in different ways, it is known as polymorphism. For example: to convince the customer differently, to draw something, for example, shape, triangle, rectangle, etc.
Abstraction - Hiding internal details and showing functionality is known as abstraction. For example phone call, we don't know the internal processing.
Q3. Why main() method must be static?
- main() method must be static.
- If main() is allowed to be non-static, then while calling the main method JVM has to instantiate it’s class.
- While instantiating it has to call constructor of that class. There will be an ambiguity if constructor of that class takes an argument.
Q4. Write code for linear search and binary search and tell time complexities of each.
1 2 3 4 5 6 7 8 9 10 | public static int search(int arr[], int x) { int n = arr.length; for (int i = 0; i < n; i++) { if (arr[i] == x) return i; } return -1; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | int binarySearch(int arr[], int x) { int l = 0, r = arr.length - 1; while (l <= r) { int m = l + (r - l) / 2; if (arr[m] == x) return m; if (arr[m] < x) l = m + 1; else r = m - 1; } return -1; } |
time complexity-O(LogN)
Q5. Write the second highest salary from table
select max(salary) from table where salary != (select max(salary)
from table);
Q6. What are joins?
Sql join statements allow us to access information from two or more tables at once.
- (INNER) JOIN: Returns dataset that have matching values in both tables
- LEFT (OUTER) JOIN: Returns all records from the left table and matched records from the right s
- RIGHT (OUTER) JOIN: Returns all records from the right table and the matched records from the left
- FULL (OUTER) JOIN: Returns all records when there is a match in either the left table or right table
Q7. difference between DDL and DML commands
Q8. What are your hobbies?
Comments
Post a Comment