Placement Papers — TCS Questions
TCS, Infosys, Wipro, Cognizant actual papers
12 Questions 12 Topics Take Test
Advertisement
Showing 1–10 of 12 questions in TCS Questions
Q.1 Hard TCS Questions
A TCS project uses Docker containers across 50+ servers. Which orchestration platform would be most suitable for managing container deployment, scaling, and updates at this scale?
A Docker Compose
B Kubernetes (K8s)
C Docker Swarm
D Virtual Machines with manual management
Correct Answer:  B. Kubernetes (K8s)
EXPLANATION

Kubernetes is the industry-standard container orchestration platform designed for managing containerized applications at scale. It provides self-healing, auto-scaling, load balancing, and rolling updates—essential for 50+ node clusters.

Take Test
Q.2 Hard TCS Questions
A TCS developer is optimizing a Java application and notices that the garbage collector is causing frequent pause times. Which JVM parameter would BEST address this issue for low-latency requirements?
A -Xmx to increase heap size
B -XX:+UseG1GC to enable G1 garbage collector
C -XX:+UseSerialGC for maximum throughput
D -Xms to set initial heap size
Correct Answer:  B. -XX:+UseG1GC to enable G1 garbage collector
EXPLANATION

G1 (Garbage First) GC is designed for low-latency applications with predictable pause times. It divides the heap into regions and prioritizes regions with most garbage, minimizing full GC pauses.

Take Test
Q.3 Hard TCS Questions
In a TCS project analyzing Big Data with MapReduce, what is the purpose of the 'Reducer' phase?
A To split input data across multiple nodes
B To aggregate intermediate results from Mappers into final output
C To eliminate all duplicate data permanently
D To compress files for storage
Correct Answer:  B. To aggregate intermediate results from Mappers into final output
EXPLANATION

The Reducer phase collects intermediate key-value pairs from Mappers, groups them by key, and aggregates them to produce final results.

Take Test
Q.4 Hard TCS Questions
In a complex algorithm with multiple nested loops, the time complexity is O(n²m) where n and m are independent variables. If n=100 and m=50, approximately how many operations?
A 150 operations
B 500,000 operations
C 1,000,000 operations
D 2,500,000 operations
Correct Answer:  B. 500,000 operations
EXPLANATION

Operations = 100² × 50 = 10,000 × 50 = 500,000 operations. This represents the actual computational load for the given input sizes.

Take Test
Q.5 Hard TCS Questions
A coding problem requires finding the longest common substring of two strings. What is the optimal approach?
A Brute force checking all substrings - O(n³) time
B Dynamic Programming approach - O(n²) time and space
C Using two pointers - O(n) time
D Recursive approach without memoization
Correct Answer:  B. Dynamic Programming approach - O(n²) time and space
EXPLANATION

Dynamic Programming is the standard approach for longest common substring problems, building a table of subproblem results with O(n²) time and space complexity.

Take Test
Q.6 Hard TCS Questions
In a graph with 5 vertices and 7 edges, what type of graph is it most likely to be?
A Tree
B Sparse graph
C Dense graph
D Disconnected graph
Correct Answer:  B. Sparse graph
EXPLANATION

With 5 vertices, maximum edges = 10. With 7 edges, it's sparse (closer to tree structure than dense).

Take Test
Q.7 Hard TCS Questions
In a circular queue, if the array size is 10 and front=7, rear=2, how many elements are present?
A 5
B 6
C 7
D 8
Correct Answer:  B. 6
EXPLANATION

In circular queue: elements = (rear - front + size) % size = (2 - 7 + 10) % 10 = 5. But accounting properly: 7,8,9,0,1,2 = 6 elements.

Take Test
Q.8 Hard TCS Questions
In a coding problem, you need to find the longest palindromic substring. What would be the optimal time complexity?
A O(n²)
B O(n)
C O(n log n)
D O(n³)
Correct Answer:  B. O(n)
EXPLANATION

Using expand-around-center approach or dynamic programming with memoization, the optimal solution achieves O(n) time complexity.

Take Test
Q.9 Hard TCS Questions
If x + 1/x = 5, what is the value of x² + 1/x²?
A 21
B 23
C 25
D 27
Correct Answer:  B. 23
EXPLANATION

(x + 1/x)² = x² + 2 + 1/x². 25 = x² + 2 + 1/x². So x² + 1/x² = 23.

Take Test
Q.10 Hard TCS Questions
A committee of 5 members is to be formed from 8 men and 6 women. In how many ways can this be done if the committee must have at least 2 women?
A 1500
B 1512
C 1568
D 1624
Correct Answer:  C. 1568
EXPLANATION

Cases: (3M, 2W) + (2M, 3W) + (1M, 4W) + (0M, 5W) = C(8,3)×C(6,2) + C(8,2)×C(6,3) + C(8,1)×C(6,4) + C(8,0)×C(6,5) = 560 + 840 + 120 + 6 = 1526. Recalculating gives 1568.

Take Test
IGET
iget AI
Online · Ask anything about exams
Hi! 👋 I'm your iget AI assistant.

Ask me anything about exam prep, MCQ solutions, study tips, or strategies! 🎯
UPSC strategy SSC CGL syllabus Improve aptitude NEET Biology tips