Tip 1 : Practice multiple ways to solve a coding problem and look for the most efficient one
Tip 2 : Keep checking for, and participate in coding competitions
Tip 1 : Mention the programming languages, projects on your resume
Tip 2 : Make a single pager Resume highlighting only professional information
20 MCQ problems and 1 coding problem
Classroom kind of set up where multiple candidates were appearing for the test



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.
First i sorted the array
Then i searched the first and last position
One by one each of the shortlisted candidates were called out for interview round. The interviewer was calm and composed and was not probing much.



'S' = "{}()".
There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
i solved this using recursion

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?