Tip 1 :Basics Data Structures and Algorithms (Array , String , Searching , Sorting) must be practiced to get through the recruitment process.
Tip 2 : Clarity of Important topics of DBMS and OOPS must be there.
Tip 3 : One should be Confident during the interview and able to explain his contribution in the project he mentioned in the resume.
Tip 1:Only put what you know or can atleast convince the interviewer.
Tip 2: Atleast have one project with trending technology.
This round was held in the morning 09:30 AM.
Platform was smooth
Pseudo codes were given and we need to give the correct output for the same.
Pseudo codes can be solved with the help of dry run by calculating the output based on the input provided in the question or with the help of random input.
It was a coding round.
Timing was from 11 AM .
The function accepts two positive integers ‘a’ and ‘unit’ and a positive integer array ‘arr’ of size ‘n’ as its arguments.‘a’ = number of rats present in an area, ‘unit’ = the amount of food each rat consumes and each ith element of array ‘arr’ = the amount of food present in ‘i+1’ house number, where 0 <= iNote:Return -1 if the array is nullReturn 0 if the total amount of food from all houses is not sufficient for all the rats.Computed values lie within the integer range.Example:Input:a: 7unit: 2n: 8arr: 2 8 3 5 7 4 1 2Output:4Explanation:Total amount of food required for all rats = a* unit= 7 * 2 = 14.The amount of food in 1st houses = 2+8+3+5 = 18. Since, amount of food in 1st 4 houses is sufficient for all the rats. Thus, output is 4.
I first wrote the code for the main function by taking all the necessary inputs and calling the calculate function in it.
Then I coded the calculate function for amount of food required.
Below is the code for the same:
#include
using namespace std;
int calculate (int a, int unit, int arr[], int n)
{
if (n == 0)
return -1;
int totalFoodRequired = a * unit;
int foodTillNow = 0;
int house = 0;
for (house = 0; house < n; ++house)
{
foodTillNow += arr[house];
if (foodTillNow >= totalFoodRequired)
{
break;
}
}
if (totalFoodRequired > foodTillNow)
return 0;
return house + 1;
}
int main ()
{
int a;
cin >> a;
int unit;
cin >> unit;
int n;
cin >> n;
int arr[n];
for (int i = 0; i < n; ++i)
{
cin >> arr[i];
}
cout << calculate (a, unit, arr, n);
return 0;
}
It was an online communication round
Timing was 10:30 AM
Jumble words were spoken and we have to listen and then speak the correct sentence.
Tip 1:Keep you ear and eyes open during this round.
Tip 2: listen and speak clearly.
It was a online interview round and the timing was 10:30 AM.
Tip 1:Be Confident and happy whenever you are giving interview
Tip 2:Prepare your intro before the interview for getting at ease during the interview
Tip 3: Try to maintain the flow of the conversation and convince the interviewer with your answer.
Tip 4: Its good to tell the interviewer if you don't know any question during the interview ,it will show your ability to accept that you do not know.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you write a single-line comment in C++?
fsa