i
TCS
Filter interviews by
Clear (1)
Leetcode medium asked. Merging the intervals
Spring framework is a Java platform that provides comprehensive infrastructure support for developing Java applications.
Spring framework facilitates the development of enterprise applications by providing solutions for dependency injection, aspect-oriented programming, and more.
It promotes good design practices such as loose coupling and separation of concerns.
Decorator pattern is a structural design pattern that allow...
I applied via Naukri.com and was interviewed in Oct 2024. There was 1 interview round.
Indexes are data structures used to improve the speed of data retrieval in databases by allowing quick access to specific rows.
Indexes are created on columns in a database table to speed up the retrieval of rows matching a certain condition.
They work similar to the index in a book, allowing you to quickly find the information you need.
Examples of indexes include primary keys, unique keys, and non-unique indexes.
Round robin is a scheduling algorithm that assigns equal time slices to each process in a circular manner.
Each process is given a small unit of time to execute before moving to the next process
Helps in achieving fairness in resource allocation
Used in CPU scheduling, load balancing, and network routing
I applied via Recruitment Consulltant and was interviewed in Sep 2024. There was 1 interview round.
Volatile keyword is used in multithreaded programming to indicate that a variable's value can be changed unexpectedly.
Ensures that the variable is always read from and written to the main memory, not from a cache
Useful for variables shared between multiple threads to prevent unexpected behavior
Does not guarantee atomicity or thread safety, additional synchronization may be needed
Spring Boot is a framework that simplifies the development of Java applications by providing pre-configured settings and tools.
Spring Boot eliminates the need for manual configuration by providing defaults for most settings.
It includes embedded servers like Tomcat, Jetty, or Undertow, making it easy to deploy standalone applications.
Spring Boot offers production-ready features like metrics, health checks, and externali...
What people are saying about TCS
I was interviewed in Jan 2025.
ArrayList and LinkedList are both classes in Java used to store and manipulate collections of data. ArrayList uses an array to store elements, while LinkedList uses a doubly linked list.
ArrayList is faster for accessing elements by index, while LinkedList is faster for adding or removing elements in the middle of the list.
ArrayList uses more memory as it needs to allocate space for the entire list upfront, while Linked...
Using Java's synchronized keyword for thread synchronization has advantages like simplicity and disadvantages like potential for deadlock. ReentrantLock offers more flexibility and control.
Advantages of synchronized keyword: simplicity, built-in support in Java
Disadvantages of synchronized keyword: potential for deadlock, lack of flexibility
ReentrantLock advantages: more flexibility, ability to try and lock with timeou...
In Java, == compares memory addresses while .equals() compares object contents.
Use == to compare primitive data types and object references.
Use .equals() to compare object contents, such as strings or custom objects.
Improper usage can lead to unexpected results, as == may not always work as expected with objects.
The Java garbage collector automatically manages memory by reclaiming unused objects.
The garbage collector in Java runs in the background, periodically checking for objects that are no longer needed.
There are different types of garbage collection algorithms in Java, such as Serial, Parallel, CMS, G1, and ZGC.
Each algorithm has its own strengths and weaknesses, and is suited for different types of applications and workl
Java 8 introduced features like lambdas and Stream API which have revolutionized the way Java applications are written.
Lambdas allow for more concise and readable code by enabling functional programming paradigms.
Stream API provides a way to process collections of objects in a functional style, allowing for easier parallel processing and improved performance.
Java 8 also introduced default methods in interfaces, allowin...
Checked exceptions are checked at compile time, while unchecked exceptions are not. Proper handling involves either catching or declaring the exception.
Checked exceptions must be either caught or declared in the method signature using the 'throws' keyword.
Unchecked exceptions do not need to be caught or declared, but can still be handled using try-catch blocks.
Examples of checked exceptions include IOException and SQLE...
The Java Memory Model defines how threads interact through memory and how changes made by one thread are visible to others.
Java Memory Model ensures that changes made by one thread are visible to other threads.
It defines the behavior of threads in terms of reading and writing to memory.
Synchronization in Java ensures that only one thread can access a shared resource at a time.
Volatile keyword in Java ensures visibility...
Method overloading involves creating multiple methods in the same class with the same name but different parameters. Method overriding involves creating a new implementation of a method in a subclass.
Method overloading is used to provide different implementations of a method based on the number or type of parameters. Example: public void print(int num) and public void print(String str)
Method overriding is used to provi...
Functional interfaces in Java are interfaces with a single abstract method. They can be used with lambda expressions for functional programming.
Functional interfaces have only one abstract method, but can have multiple default or static methods.
Lambda expressions can be used to implement the single abstract method of a functional interface concisely.
An example of a custom functional interface is 'Calculator' with a sin
Java Stream is a sequence of elements that supports functional-style operations. It differs from Iterator by allowing for more concise and declarative code.
Streams are designed to allow for functional-style operations on collections, such as map, filter, and reduce.
Streams do not store elements, they operate on the source data structure (e.g., List) directly.
Iterators are used to sequentially access elements in a colle...
Immutability in Java means objects cannot be modified after creation. String class achieves immutability by not allowing changes to its value.
String class in Java is immutable because once a String object is created, its value cannot be changed.
Any operation that appears to modify a String actually creates a new String object with the modified value.
Advantages of immutable objects include thread safety, caching, and ea
final, finally, and finalize have different meanings in Java.
final is a keyword used to declare constants, prevent method overriding, and prevent inheritance.
finally is a block used in exception handling to execute code after try-catch block.
finalize is a method used for cleanup operations before an object is garbage collected.
Singleton design pattern ensures a class has only one instance and provides a global point of access to it.
Create a private static instance of the class.
Make the constructor private to prevent instantiation from outside the class.
Provide a public static method to access the instance, creating it if necessary.
Use synchronized keyword or double-checked locking to ensure thread safety.
Java annotations are metadata that provide data about a program but do not affect the program itself. They are used in frameworks like Spring to configure and customize behavior.
Java annotations are used to provide metadata about a program, such as information about classes, methods, or fields.
In frameworks like Spring, annotations are used to configure various aspects of the application, such as dependency injection, ...
Java Streams can handle parallel processing using parallel streams. Pitfalls include increased complexity and potential for race conditions.
Java Streams can be processed in parallel by calling the parallel() method on a stream.
Potential pitfalls of using parallel streams include increased complexity, potential for race conditions, and performance overhead.
To mitigate these pitfalls, ensure that the operations performed...
ArrayList for frequent retrieval, LinkedList for frequent insertions/deletions.
Use ArrayList when frequent retrieval operations are needed, such as searching for specific elements in a list.
Choose LinkedList when frequent insertions/deletions are required, like maintaining a queue or stack.
Consider memory overhead and performance trade-offs when deciding between ArrayList and LinkedList.
ReentrantLock should be used instead of synchronized when more flexibility and control over locking mechanisms are required.
Use ReentrantLock when you need to implement advanced locking mechanisms like tryLock() or lockInterruptibly().
ReentrantLock supports fair locking mechanisms, unlike synchronized.
ReentrantLock allows for explicit unlocking, reducing the chances of human errors.
Synchronized is simpler and preferred
In Java, == checks for reference equality while equals() checks for value equality. Misuse of == can lead to logical errors.
Override equals() when you want to compare the actual content of objects in user-defined classes.
Override hashCode() alongside equals() to ensure consistent behavior in hash-based collections.
Consider implementing Comparable interface for natural ordering of objects.
Garbage collection in Java automatically reclaims memory occupied by unused objects using different GC algorithms.
Force garbage collection in Java using System.gc() or Runtime.gc() methods.
Not recommended to force garbage collection as it can cause performance issues by disrupting the JVM's natural memory management.
Forcing garbage collection can lead to increased CPU usage and potential application slowdowns.
Lambda expressions in Java 8 improve readability and maintainability by allowing concise and functional-style programming.
Lambda expressions reduce boilerplate code by providing a more concise syntax for implementing functional interfaces.
They make code more readable by allowing developers to express actions as methods that can be passed around as arguments.
Lambda expressions enable a more declarative style of programm...
TCS interview questions for designations
Good test, little tough
Lists in DSA are data structures that store a collection of elements in a specific order.
Lists allow for easy insertion and deletion of elements.
Examples include linked lists, arrays, and doubly linked lists.
Lists can be implemented using arrays or linked nodes.
Algorithms are used to solve complex problems efficiently and accurately in various fields.
Algorithms help in optimizing processes and improving performance.
They are used in various applications such as search engines, recommendation systems, and data analysis.
Algorithms are essential in computer science for tasks like sorting, searching, and graph traversal.
Get interview-ready with Top TCS Interview Questions
I applied via Campus Placement
Write a Tim Sort in COBOL
Write a merge sort in Hindi
2 sections 1)aptitude 2)coding
I applied via Campus Placement and was interviewed in Jun 2024. There were 4 interview rounds.
General aptitude questions were asked
One of the worst compilers and ide i have seen till now, better practice to program in a notepad
Yes, I am open to relocating for the right opportunity.
I am open to relocating for the right job opportunity
I have relocated for previous jobs and am comfortable with the process
I am willing to consider different locations based on the job offer
Yes, I am willing to join.
I am excited about the opportunity to work as a Software Engineer.
I am ready to contribute my skills and knowledge to the team.
I am eager to learn and grow in this role.
All questions regarding aptitude were asked
There are two questions given. The level of the questions are medium and hard.
I chose software because of my passion for coding and problem-solving, and the endless opportunities for innovation and growth in the field.
Passion for coding and problem-solving
Endless opportunities for innovation and growth
Interest in technology and software development
Ability to work on diverse projects and industries
Constraints are limitations or restrictions placed on a system or software. OS layers refer to the different levels of an operating system.
Constraints can include limitations on resources such as memory or processing power
Constraints can also refer to design limitations or requirements imposed by stakeholders
OS layers typically include the kernel, device drivers, system libraries, and user interface
Examples of constrai...
I applied via Company Website and was interviewed in Jun 2024. There were 4 interview rounds.
Aptitude test conducted in nqt tcs
Coding test conducted in nqt tcs
A program to print prime numbers up to n numbers
Iterate through numbers from 2 to n
Check if each number is prime by dividing it by numbers up to its square root
If a number is prime, add it to the list of prime numbers
I am passionate about technology and enjoy problem-solving in the IT field.
Passion for technology and innovation
Enjoy problem-solving and logical thinking
Opportunities for continuous learning and growth
High demand for IT professionals in various industries
Some of the top questions asked at the TCS Software Engineer interview -
The duration of TCS Software Engineer interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 276 interviews
5 Interview rounds
based on 1.5k reviews
Rating in categories
System Engineer
1.1L
salaries
| ₹0 L/yr - ₹0 L/yr |
IT Analyst
66.6k
salaries
| ₹0 L/yr - ₹0 L/yr |
AST Consultant
51.5k
salaries
| ₹0 L/yr - ₹0 L/yr |
Assistant System Engineer
29.8k
salaries
| ₹0 L/yr - ₹0 L/yr |
Associate Consultant
29.5k
salaries
| ₹0 L/yr - ₹0 L/yr |
Amazon
Wipro
Infosys
Accenture