Tip 1 : Practice 5-8 Codes daily
Tip 2 : Thoroughly Prepare for Data Structure and don't miss on any methods.
Tip 3 : Enroll in Online Courses of Coding ninjas if you're new to programming in introductory course or in any domain of Interview Preparation.
Tip 1 : Have some projects related to cutting edge technology like AI, ML, Block chain. Try to know it all about your Project.
Tip 2 : Do not lie on your resume. Just mention the things you're confident about and brush up your skills on a periodic basis.
Aptitude test was there in this round. MCQ's from Quantitative, Reasoning were there. The difficulty level was moderate and can be solved by anyone having good practice.
The topics from which questions were asked: Time and Distance, Probability , English , Passage.
It was at around 11am. There were two descriptive Coding question on the TCS own platform. It was a proctored test.



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.
or the Input 14
--AB--AB---A--
Explanation:
For starting positions where there is no opposition from supporter of B, supporter of A can promote in left side of the queue. The voting queue will then look like below:
A A A B - - A B - - - A - -
From 4th place (in voting queue) B supporter is moving towards the right side, simultaneously 7th placed A supporter is also moving towards the left side. Then the voting queue will look like below:
A A A B B A A B - - - A - -
From 8th place B supporter is moving towards the right side, simultaneously 12th placed A supporter is also moving towards the left side. Then the voting queue will look like below:
A A A B B A A B B - A A - -
Since supporters of both A and B will reach the 10th voter at the same time, 10th voter will remain neutral.
Since supporter of A at 12th place cannot move towards right, last 2 voters will not be influenced and remain neutral. Then the voting queue will look like below:
A A A B B A A B B - A A - -
Since all voter have now cast their votes, election results can now be declared.
So final result is: A A A B B A A B B - A A - -
A has 7 votes, B has 4 votes hence, A wins the election.
It was at around 1pm. The interviewer was quite friendly. He asked me questions regarding my Projects which I have mentioned on my resume. He then asked few SQL queries, some OOPS concepts and then a few questions on AWS.
He seemed satisfied by my answers. In the same Panel the HR asked me few question regarding Location preferences and how online classes are impacting my studies. I answered
Tip 1 : Find Second Max salary in Employee table



Pattern for 'N' = 4
1111
000
11
0

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: