![]() |
VOOZH | about |
You are given two integer M and N. You have to find the prime factors of all the numbers in the range[M, N](both inclusive). Write a program to find the number of times a prime number P comes in the prime factorization of the numbers in the range. Print the answer multiplied by number K.
Question 4: Rearranging arrays In a given array, remove every occurrence of K, shift all remaining elements on left, and insert as many 1 as K occurred.
Whoever solved 3 questions, got selected for next rounds.Question: What does the following declaration signify?
int (*ptr)[10];
ptr is an array of pointers to 10 integers
ptr is a pointer to an array of 10 integers
ptr is an array of 10 integers
ptr is a pointer to an array
Question: What does the following declaration signify?
int (*pf)();
pf is a pointer to a function
pf is a function pointer
pf is a pointer to a function which returns ‘int’.
pf is a function of a pointer variable.
Round 2: In this round interviewer wanted to know whether the candidate is able to write code or not. He didn't care about time and space complexity. There are some questions which were asked to me as well as other selected candidates. Trap water problem, Next greater element on right, Flattening linked list(hard level), Add two numbers in linked list, Max area in histogram, Max area rectangle in binary Matrix, Find Peak element in array, Max sum from leaf to leaf in Binary tree, Stack Queue & Linked list implementation insertion-deletion and update, left view of Binary tree, longest palindromic substring, max sum of array having no adjacent elements. Tips - Practice Must do coding question from geeksforgeeks and solve as many as questions from interviewbit. Be clear with your approach.
Round 3: It was also coding round where we had to give optimised approach and code as well i.e. asked above. He told me to solve Rainwater Trapping problem and I solved it with optimisation. Apart from these, he discussed with me about my projects like what was your role and what’s your contribution in project, how your project works and issues came during projects. The interviewer will give you enough time to think, to code, to optimise, so think logically and explain your approach clearly by giving a satisfactory reason.
Tips - Honesty is the best policy. You will be caught very easily if you are faking, so be honest. Do all the optimisation problems of array.