Home Subjects Placement Papers TCS Questions

Placement Papers
TCS Questions

TCS, Infosys, Wipro, Cognizant actual papers

44 Q 10 Topics Take Mock Test
Advertisement
Difficulty: All Easy Medium Hard 11–20 of 44
Topics in Placement Papers
Q.11 Medium TCS Questions
An array [7, 3, 9, 1, 4, 2, 8] needs to be sorted. If memory is extremely limited, which sorting algorithm should be preferred?
A Merge Sort (requires O(n) extra space)
B Quick Sort (requires O(log n) extra space on average)
C Heap Sort (requires O(1) extra space)
D Bubble Sort with any space complexity
Correct Answer:  C. Heap Sort (requires O(1) extra space)
EXPLANATION

Heap Sort is an in-place sorting algorithm requiring only O(1) extra space, making it optimal for memory-constrained environments despite having O(n log n) time complexity.

Test
Q.12 Medium TCS Questions
TCS developers working on cloud-based projects often use microservices architecture. What is a PRIMARY advantage of this approach?
A Single point of failure for entire application
B Independent scalability, easier maintenance, and resilience
C Reduced development time by 50%
D Eliminates need for testing
Correct Answer:  B. Independent scalability, easier maintenance, and resilience
EXPLANATION

Microservices architecture allows individual components to scale independently, improves fault isolation, enables easier updates, and promotes team autonomy in development.

Test
Q.13 Medium TCS Questions
A software engineer at TCS needs to optimize a search operation in a large database containing 1 million records. Which data structure would be most efficient?
A Unsorted Linked List with O(n) search time
B Binary Search Tree or Hash Table with O(log n) or O(1) average time
C Stack with LIFO property
D Queue with FIFO property
Correct Answer:  B. Binary Search Tree or Hash Table with O(log n) or O(1) average time
EXPLANATION

For searching in large datasets, Binary Search Trees provide O(log n) complexity and Hash Tables provide O(1) average case, both significantly better than linear search in unsorted structures.

Test
Q.14 Medium TCS Questions
If you have an array [3,1,4,1,5,9,2,6], what is the median?
A 3.5
B 4
C 3
D 5
Correct Answer:  A. 3.5
EXPLANATION

Sorted: [1,1,2,3,4,5,6,9]. Median of 8 elements = (3+4)/2 = 3.5

Test
Q.15 Medium TCS Questions
Which of the following is NOT a characteristic of NoSQL databases?
A Schema-less
B Horizontal scalability
C ACID transactions
D High availability
Correct Answer:  C. ACID transactions
EXPLANATION

NoSQL databases typically follow eventual consistency rather than strict ACID properties.

Test
Q.16 Medium TCS Questions
What is the primary advantage of using microservices architecture in TCS projects?
A Increased monolithic design
B Independent deployment and scalability
C Reduced code quality
D Single point of failure
Correct Answer:  B. Independent deployment and scalability
EXPLANATION

Microservices allow independent scaling, deployment, and development of different services.

Test
Q.17 Medium TCS Questions
A database query has time complexity O(n log n). For n=1000, approximately how many operations occur?
A 1000
B 10000
C 100000
D 1000000
Correct Answer:  B. 10000
EXPLANATION

O(n log n) with n=1000: 1000 × log₂(1000) ≈ 1000 × 10 = 10000 operations.

Test
Q.18 Medium TCS Questions
Which sorting algorithm is most suitable when memory is limited?
A Merge Sort
B Heap Sort
C Quick Sort
D Counting Sort
Correct Answer:  B. Heap Sort
EXPLANATION

Heap Sort uses O(1) extra space, making it ideal for memory-constrained environments.

Test
Q.19 Medium TCS Questions
TCS's Digital platform focuses on which emerging technologies as of 2024-25?
A Blockchain and NFTs only
B AI/ML, Cloud, and Cybersecurity
C Only IoT
D Web 1.0 technologies
Correct Answer:  B. AI/ML, Cloud, and Cybersecurity
EXPLANATION

TCS's digital transformation strategy emphasizes AI/ML, cloud computing, and cybersecurity as core competencies.

Test
Q.20 Medium TCS Questions
What is the space complexity of the merge sort algorithm?
A O(1)
B O(n)
C O(log n)
D O(n log n)
Correct Answer:  B. O(n)
EXPLANATION

Merge sort requires O(n) extra space for creating temporary arrays during the merge process.

Test
IGET
IGET AI
Online · Exam prep assistant
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