Capgemini Engineering
TCS Interview Questions and Answers
Q1. Single linked list operations ( adding and deleting a node)
Single linked list operations involve adding and deleting nodes in a linear data structure.
To add a node, create a new node and set its next pointer to the current head, then set the head to the new node.
To delete a node, traverse the list until the node to be deleted is found, then set the previous node's next pointer to the node after the one being deleted.
Be careful to handle edge cases such as adding to an empty list or deleting the head node.
Q2. Explain about the different layers in OSI model.
The OSI model has 7 layers that define how data is transmitted over a network.
Layer 1: Physical layer - deals with the physical aspects of transmitting data
Layer 2: Data link layer - responsible for error-free transfer of data between nodes
Layer 3: Network layer - manages the routing of data between nodes
Layer 4: Transport layer - ensures reliable delivery of data between applications
Layer 5: Session layer - establishes and manages connections between applications
Layer 6: Pre...read more
Q3. Programs on string operations
String operations programs manipulate and modify strings.
Use built-in string functions like substring, replace, and split.
Implement algorithms like string reversal, palindrome check, and string compression.
Regular expressions can also be used for advanced string operations.
Examples: reversing a string, counting occurrences of a substring, converting a string to title case.
Q4. Binary search with an example
Binary search is a search algorithm that finds the position of a target value within a sorted array.
Divide the array into two halves
Compare the target value with the middle element
If the target value matches the middle element, return its position
If the target value is less than the middle element, search the left half
If the target value is greater than the middle element, search the right half
Q5. Resources type vs traits in raml
Resources type defines the structure of the data while traits define reusable properties and behaviors.
Resources type specifies the structure of the data that can be accessed through the API endpoints.
Traits define reusable properties and behaviors that can be applied to multiple resources or methods.
Resources type is used to define the data model, while traits are used to define common functionalities like authentication, logging, etc.
Q6. Authentication vs authorization
Authentication verifies the identity of a user, while authorization determines what actions the user is allowed to perform.
Authentication confirms the identity of a user through credentials like passwords or biometrics.
Authorization controls access to resources based on the authenticated user's permissions.
Example: Logging into a system with a username and password is authentication, while being able to view certain files based on user roles is authorization.
Q7. What is cloudhub 2.0
CloudHub 2.0 is a cloud-based integration platform that allows organizations to connect applications, data, and devices across multiple environments.
CloudHub 2.0 offers enhanced scalability and performance compared to its predecessor.
It provides a centralized platform for managing integrations, APIs, and data flows.
Organizations can use CloudHub 2.0 to streamline their business processes and improve efficiency.
Examples of features include real-time monitoring, automated workf...read more
Interview Process at TCS
Top Analyst Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month