Tip 1 : Give as many contests as possible and upsolve them.
Tip 2 : Your ability to write clean code matters in an interview. Keep this in mind even while preparing.
Tip 3 : Try to give mock interviews to remove any hesitation/fear of interviews.
Tip 1 : Have at least one good project on your resume.
Tip 2 : Get your resume reviewed by experienced folks.



[1, 2, 3, 4] is a strictly increasing array, while [2, 1, 4, 3] is not.
I had done this question before as this was a standard DP question. It was solved using a 2D dp array.



It is a simple question based on graphs. You just have to find the count of connected components. It can be done using DF/BFS.



I used a hashmap to store the frequency of substrings to be considered and kept taking the maximum of all of them, which gave me the answer.


1. The voter queue is denoted by three characters, viz {-, A, B}. The ‘-’ denotes neutral candidate, ‘A’ denotes supporter of candidate A and ‘B’ denotes supporter of candidate B.
2. Supporters of A can only move towards the left side of the queue.
3. Supporters of B can only move towards the right side of the queue.
4. Since time is critical, supporters of both A and B will move simultaneously.
5. They both will try and influence the neutral voters by moving in their direction in the queue. If a supporter of A reaches the neutral voter before a supporter of B reaches him, then that neutral voter will become a supporter of candidate A.
6. Similarly, if a supporter of B reaches the neutral voter before supporter of A reaches him, then that neutral voter will become a supporter of candidate B.
7. Finally, if both reach at the same time, the voter will remain neutral. A neutral vote cannot decide the outcome of the election.
8. If finally, the queue has more votes for candidate A, then A wins the election. If B has more votes, then B wins that election. If both have equal votes, then it will be a coalition government.
Given string- “B--A-”
B ---> B A <--- A B
----------------------------->
Output - B as B can move towards right only and A can move in left direction only. Thus B has 3 supporters in total while A have only 2 supporters.
1. There are no test cases where all votes are neutral.
2. The influenced voters do not move and hence does not have any influence over the neutral voters.
The first variation is an easy hashing question. Just keep a counter for each candidate and the one with the maximum votes is the winner.
In the second variation also, we can maintain a counter for each candidate, updating their votes as we iterate through the list. The challenge in this question was not to solve it but to solve it while maintaining good code quality. I focused on making my code modular by breaking it into functions and giving proper names to variables. After I was done coding, I did a dry run for some cases and also tested it on cases given by the interviewer and he seemed satisfied.
Explain your project.
How was your experiencing working with your team in making project?
Tell me a time when you gave feedback to someone?
Describe a situation where you displayed leadership quality?
Tip 1 : Read the 5 values of Atlassian from its homepage.
Tip 2 : Take a few seconds to think about your answer before you speak.

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?