Tiger Analytics
TCS Interview Questions and Answers
Q1. Architecture diagram of project
The architecture diagram of the project showcases the overall structure and components of the system.
The architecture diagram typically includes components like servers, databases, APIs, and client applications.
It shows how these components interact with each other and the flow of data within the system.
Commonly used tools for creating architecture diagrams include Microsoft Visio, Lucidchart, and draw.io.
Q2. Project description
Developed a data analysis project to optimize marketing strategies for a retail company.
Utilized customer segmentation techniques to identify target demographics
Analyzed sales data to determine the most effective marketing channels
Implemented A/B testing to measure the impact of different marketing campaigns
Q3. most frequent word in a sentence ?
The most frequent word in a sentence can be found by counting the occurrence of each word and selecting the one with the highest count.
Split the sentence into words using whitespace as delimiter
Create a dictionary to store the count of each word
Iterate through the words and update the count in the dictionary
Find the word with the highest count in the dictionary
Q4. Python code to find the root of a number
Python code to find the root of a number
Use the math module to access the sqrt() function
Use the ** operator to raise the number to the power of 1/n
Handle negative numbers by converting them to complex numbers
Q5. Dicision Tree algorithm
Decision Tree algorithm is a supervised learning algorithm used for classification and regression tasks.
Decision Tree algorithm is based on a tree-like model of decisions and their possible consequences.
It uses a set of rules to split the data into branches and make predictions at the leaf nodes.
The algorithm selects the best attribute to split the data based on certain criteria like information gain or Gini index.
Decision Trees can handle both categorical and numerical data....read more
Q6. Get Second highest element from an array (duplicates elements are allowed). Required T.C-->O(N) Single traversal. S.C--->O(1)
Get second highest element from an array of strings with O(N) time complexity and O(1) space complexity.
Initialize two variables to store the highest and second highest elements.
Traverse the array and update the variables accordingly.
Return the second highest element.
Handle edge cases like empty array or array with only one element.
Q7. Coffiecent of x^7 in equation ? y=(x^101-1)(x^100+1)(x^99-1)...........................................(X^0+1)
Coffiecent of x^7 in a given equation
Use the binomial theorem to expand the equation
Identify the term with x^7
The coefficient of x^7 is the coefficient of that term
Q8. Sort nearly sortes array.
Sort nearly sorted array using min heap
Create a min heap of size k+1
Insert first k+1 elements into min heap
For remaining elements, extract min and insert new element
Extract all remaining elements from min heap
Time complexity: O(nlogk)
Example: ['apple', 'banana', 'cherry', 'date', 'elderberry']
Interview Process at TCS
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month