Tip 1: Practice at least 300 coding questions.
Tip 2: Be confident.
Tip 3: Don't tell lies in interviews.
Tip 1: Mention some good projects.
Tip 2: Don't put any false things.
CodeVita: CodeVita is an online coding contest that is conducted by TCS every year across the whole world for coders to showcase their programming skills. There are three rounds in CodeVita:
Pre Qualifier: Conducted Online
Qualifier: Conducted Online
Grand Finale: Conducted in India (offline) in TCS centers
In the Pre Qualifier round, there are 6 questions, and if you are able to solve at least 1 question and clear it’s all the test cases, there is a chance that you will get an interview call from TCS. For the safe side try to solve 2 questions or more completely.
List: 10 -> 20 -> 30 -> 40 -> 50 -> 60 -> null
Alternate nodes will be: 20, 40, and 60.
Hence after deleting, the list will be:
Output: 10 -> 30 -> 50 -> null
The head of the list will remain the same. Don't need to print or return anything.
This was a very easy question. We just need to traverse the whole link list. Set initial count to 0. Then go on printing the nodes when the count is even and visit the next node.
We cannot use the element at a given index twice.
Try to do this problem in O(N) time complexity.
The brute force approach is simple. Loop through each element x and find if there is another value that equals to target - x.
To improve our run time complexity, we need a more efficient way to check if the complement exists in the array. If the complement exists, we need to look up its index. What is the best way to maintain a mapping of each element in the array to its index? A hash table.
We reduce the look-up time from O(n) to O(1) by trading space for speed. A hash table is built exactly for this purpose, it supports fast lookup in near-constant time. I say "near" because if a collision occurred, a look-up could degenerate to O(n) time. But look up in hash table should be amortized O(1) time as long as the hash function was chosen carefully.
A simple implementation uses two iterations. In the first iteration, we add each element's value and its index to the table. Then, in the second iteration, we check if each element's complement (target - nums[i]) exists in the table. Beware that the complement must not be nums[i] itself.
We were informed by the TCS a day before the interview about the time of our interview and all. As this year the whole process was online so a bunch of instructions was mentioned by TCS like the internet connectivity, important documents to present, and all. I joined the virtual lobby on time and my slot was from 3:30 PM to 6:30 PM, there were a few more candidates in the virtual lobby, and a lady started to speak. I was the first to give the interview and all other candidates were given different slots by that lady for their interviews.
Tell me something about yourself and tell me about the approaches you used to solve the problems in the contest:
I introduced myself with confidence and tried to showcase my skills in the introduction because the flow of the whole interview depends very much upon the introduction. I explained to him the question and my approach. The question was basically to find whether a given string contains 3 palindrome sub-strings or not.
My approach for solving this question was: consider the first letter as the first sub-string and the second letter as the second sub-string and the remaining letters as the third sub-string and check these 3 sub-strings are palindromes or not. If yes, return true, or else keep on increasing the number of letters in the second sub-string and first sub-string.
Be ready to give answers to questions like any other better approach, time complexity of your solution, or can we use any other data structure which can improve the time complexity of our solution.
Four pillars of Object-oriented programming are Abstraction, Encapsulation, Inheritance, and Polymorphism.
Serialization in Java is a mechanism of writing the state of an object into a byte-stream. The reverse operation of serialization is called deserialization where byte-stream is converted into an object.
I had read up these topics from GFG before.
This interview directly started with questions.
How has the covid-19 pandemic affected the IT industry?
I answered that the covid-19 pandemic has affected all the industries but not the IT industry where physical presence is not required . Work from home was easily implemented in this industry and the productivity of the company and employees was not affected that much. Companies, where physical presence is required, were most affected during the covid-19 nationwide lockdown.
What is the contribution of the TATA group towards the betterment of our nation?
You have to do your research about the company so that interviewer will think that you are genuinely interested to join the company. I answered the question and told him about the charities which done by the TATA group and Ratan Tata (former chairman of Tata Sons).
First, she introduced herself and then asked me to give my introduction. Then she asked behavorial and general questions.
1 : To answer this question, my research about TCS helped me. I told her TCS is a great company and I will learn a lot from my seniors and colleagues. And I also told her that you can take a study gap in TCS to complete your higher education.
2 : I said no. She then explained to me the contract.
3 : I said yes ma’am with confidence and a smile on my face.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What does ROLLBACK do in DBMS?
are you serisous ? HR round with 3 question's and of 90 minute ?
kuch bhi bologe kya ?