Tip 1 : before interview, practice questions with company tag on websites like leetcode and see previous experiences
Tip 2 : even if you're able to solve the question, see approaches used by other people and try to solve the question in multiple ways
Tip 1 : put links of your work like competitive coding profiles, hosted projects, github, etc
Tip 2 : revise everything on your resume before interview



1
11
121
1221


1. In a row, after selecting an element at a given position, you cannot select the element directly below it
2. You can only select elements that are not directly below the previously selected element.



1. Buying a stock and then selling it is called one transaction.
2. You are not allowed to do multiple transactions at the same time. This means you have to sell the stock before buying it again.
Input: ‘n’ = 7, ‘prices’ = [3, 3, 5, 0, 3, 1, 4].
Output: 6
Explanation:
The maximum profit can be earned by:
Transaction 1: Buying the stock on day 4 (price 0) and then selling it on day 5 (price 3).
Transaction 2: Buying the stock on day 6 (price 1) and then selling it on day 6 (price 4).
Total profit earned will be (3 - 0) + ( 4 - 1) = 6.



1. Every inner brace should increase one indentation to the following lines.
2. Every close brace should decrease one indentation to the same line and the following lines.
3. Every ‘,’ will mean a separate line.
4. The indents can be increased with an additional 4 spaces or ‘/t’.
Let the input be: "{A:"B",C:{D:"E",F:{G:"H",I:"J"}}}"
Then we return the following array of strings:
{
A:"B",
C:
{
D:"E",
F:
{
G:"H",
I:"J"
}
}
}
Note that for every new brace we are putting an additional 4 spaces or \t.
1. [] and {} are only acceptable braces in this case.



1. There are no 2 adjacent elements having same value (as mentioned in the constraints).
2. Do not print anything, just return the index of the peak element (0 - indexed).
3. 'True'/'False' will be printed depending on whether your answer is correct or not.
Input: 'arr' = [1, 8, 1, 5, 3]
Output: 3
Explanation: There are two possible answers. Both 8 and 5 are peak elements, so the correct answers are their positions, 1 and 3.
1. I gave a O(n) solution doing a basic iteration and comparing each element with its neighbors.
2. But interviewer asked me to optimize further but I was not able to understand how to apply binary search on this
First he started by asking what is the `<<` operator in C++ in the statement `cout << "string";` and what is the concept used here. Then he asked for more examples of operator overloading.
He then asked me what is polymorphism and its examples.
Tip 1 : Revise the basics and be familiar with definitions
Tip 2 : Try to remember examples for different concepts

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?