Tip 1 : Solve questions in each topic and make sure to note down important concepts for quick review
Tip 2 : Practice specifically for interviews too by solving questions asked previously in top firms
Tip 3 : Pay utmost importance to your projects
Tip 1 : Put links for your projects on resume
Tip 2 : Strictly one page, with only relevant points
Online coding assessment having 20 MCQs and 2 coding questions
There can be more than one possible string with maximum size. In that case, you can return any of them.
The first interview round was fairly easy, and the interviewer was very helpful. It was an hour long interview.
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.
In the given linked list, there is a cycle, hence we return true.
It was a long interview, although the interviewer was again very friendly. The main focus was on problem solving in this round too.
Let the given array be [1,5,4,3,2] we swap index 1 with 4 i.e. 5 -> 2 and 2 with 3 i.e. 4 -> 3 to form the sorted array {1, 2, 3, 4, 5}.
1. Each coin has a value associated with it.
2. It’s a two-player game played against an opponent with alternating turns.
3. At each turn, the player picks either the first or the last coin from the line and permanently removes it.
4. The value associated with the coin picked by the player adds up to the total amount the player wins.
'N' is always even number.
Ninjax is as smart as you, so he will play so as to maximize the amount he wins.
Let the values associated with four coins be: [9, 5, 21, 7]
Let’s say that initially, you pick 9 and Ninjax picks 7.
Then, you pick 21 and Ninjax picks 5.
So, you win a total amount of (9+21), i.e. 30.
In case you would have picked up 7 initially and Ninjax would have picked 21 (as he plays optimally).
Then, you would pick 9 and Ninjax would choose 5. So, you win a total amount of (7+9), i.e. 16, which is not the maximum you can obtain.
Thus, the maximum amount you can win is 30.
Let the values associated with four coins be: [20, 50, 5, 10]
Let’s say that initially, you pick 10 and Ninjax picks 20.
Then, you pick 50 and Ninjax picks 5.
So, you win a total amount of (10+50), i.e. 60.
In case you would have picked up 20 initially and Ninjax would have picked 50 (as he plays optimally).
Then, you would pick 10 and Ninjax would choose 5. So, you win a total amount of (20+10), i.e. 30, which is not the maximum you can obtain.
Thus, the maximum amount you can win is 60.
It was a technical cum HR round which was take by a Director of Software Engineering team based in Salesforce SF. The initial questions were based on basics of C++/Python and some OOPS questions. Then they grilled a lot based on the resume and specially the projects mentioned on it. Some hr questions like challenges faced in life and how you solved them, how do you see yourself in the next 5 years and how do you think Salesforce aligns with it, etc.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which keyword is used for inheritance?