Home Subjects Placement Papers

Placement Papers

TCS, Infosys, Wipro, Cognizant actual papers

312 Q 10 Topics Take Test
Advertisement
Difficulty: All Easy Medium Hard 281–290 of 312
Topics in Placement Papers
Q.281 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.282 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.283 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.284 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.285 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.286 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.287 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.288 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
Q.289 Medium TCS Questions
Which data structure is most efficient for implementing a priority queue in competitive programming?
A Array
B Linked List
C Heap
D Binary Search Tree
Correct Answer:  C. Heap
EXPLANATION

Heaps provide O(log n) insertion and deletion, making them optimal for priority queues compared to other structures.

Test
Q.290 Medium TCS Questions
A number is 5 more than another number. If their sum is 25, find the larger number.
A 10
B 12
C 15
D 18
Correct Answer:  C. 15
EXPLANATION

Let smaller number = x. Larger = x+5. Sum: x + (x+5) = 25 → 2x = 20 → x = 10. Larger = 15

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