Tip 1 : If you have done thorough competitive Programming and computer science fundamentals. All these faang interviews will be very easy.
Tip 2 : Prepare enough so that the moment the interviewer throws the problem you solve it in your mind instantly. If you solve it on spot then it can result in a serious waste of time.
Tip 3 : Always explain the brute force approach first then go for optimized solution in a gradual way
Tip 1 : Always have relevant points and make a 1-page resume.
Tip 2 : Don't leave a lot of white spaces.
For some reason the online test was very easy. I was able solve both problems in 10 mins. But interviews were really good.


If N = 5 and the array is: { 1, 6, 4, 3, 5 }
We will return { 6, -1, 5, 5, 6 }
because 6 is the first element to the right of 1 that is greater than 1,
no element exists that is greater than 6,
5 is the first element to the right of 4 that is greater than 4,
5 is the first element to the right of 3 that is greater than 3,
6 is the first element to the circular-right of 5 that is greater than 5.



A person can also kill himself.

Let 'N' = 3, 'X' = 13, 'L' = [2, 3, 5], 'R' = [4, 5, 7].
We can assign 2 marks to the first student, 5 marks to the second student, and 5 marks to the third student.
So the median mark is 5 which is the maximum possible.



‘ROW1’ : [2, 5, 8, 17] and ‘ROW2’ : [1, 4, 8, 13, 20]
If ‘ROW1’ is [2, 5, 8, 17] and ‘ROW2’ is [1, 4, 8, 13, 20], then Ninja picks the first plates from each rows, plate containing 2 ladoos from ‘ROW1’ and a plate containing 1 ladoo from ‘ROW2’.
Then he gives the plate with 1 Ladoo to the first person in line and places the other plate back to its position.
Nested Binary Search
There were 2 interviewers both asked problems on Binary Search and Linear Data Structure.



The start time of one job can be equal to the end time of another.
Binary Search



For the given array 'ARR' = [7, 12, 1, 20]
The next greater element for 7 is 12.
The next greater element for 12 is 20.
The next greater element for 1 is 20.
There is no greater element for 20 on the right side.
So, the output is [12, 20, 20, -1].
2 interviewers and 1 problem by both of them



Let text = “this is a good place to have a good start”, pattern = “good” so you have to return {10, 31} because at 10 and 31 index pattern is present in the text.
If there is no such index in the text then just return an array containing -1.


Subsequences of string "abc" are: ""(empty string), a, b, c, ab, bc, ac, abc.
2 interviewers asking about project and design questions
Describe the functionality of your project.
What is one thing that you want to change in your project?
Tip 1 : Thoroughly revise your projects
Tip 2 : Know the ins-n-outs of your projects
Tip 3 : Know about tools regularly used in other firms.
Design a File generator. Give a JSON data in the database and design a file generator that will convert JSON to pdf, txt, docx and other file format.
Tip 1 : Design a flexible system so that it can sustain extensions and modifications in the future.
Tip 2 : Know OOPS concepts
Tip 3 : Inheritance and class high-level designing.

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?