Tip 1 : Go through all the previous interview experience.
Tip 2 : Must do previously asked interview Questions and standard coding questions
Tip 3 : Do at least 2 Projects
Tip 1 : Mention your best two Projects.
Tip 2 : You must know each and every thing which is in resume.



1. The array follows 0-based indexing, so you need to return 0-based indices.
2. If 'x' is not present in the array, return {-1 -1}.
3. If 'x' is only present once in the array, the first and last position of its occurrence will be the same.
Input: arr = [1, 2, 4, 4, 5], x = 4
Output: 2 3
Explanation: The given array’s 0-based indexing is as follows:
1 2 4 4 5
↓ ↓ ↓ ↓ ↓
0 1 2 3 4
So, the first occurrence of 4 is at index 2, and the last occurrence of 4 is at index 3.
Step 1 : Run a for loop and for i = 0 to n-1
Step 2 : Take first = -1 and last = -1
Step 3 : When we find element first time then we update first = i
Step 4 : We always update last=i whenever we find the element.
Step 5 : We print first and last.
After this solution all the test cases was passed.



1. If 'X' is not found in the array, return 0.
2. The given array is sorted in non-decreasing order.
Method 1 (Linear Search)
Linearly search for x, count the occurrences of x and return the count.
Interviewer asked me to optimise the solution.
Method 2 (Better using Binary Search)
We first find an occurrence using binary search. Then we match toward left and right sides of the matched the found index.
Tip 1 : Strengthen you SQL concepts
Tip 2 : Go through the entire DBMS twice
It was a interview round with the Hiring Manager. Typical HR Questions were asked.
Tip 1 : Introduce yourself by including certain adjectives like problem-solving, innovation and tech-savvy, creative, quick learner, etc. that best describe you in your professional life to boost your chances.
Tip 2 : Do not tell any weakness that can potentially jeopardize your candidature

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?