Govt. Exams
Merge sort requires O(n) extra space for creating temporary arrays during the merge process.
10110₂ = 1×16 + 0×8 + 1×4 + 1×2 + 0×1 = 16 + 4 + 2 = 22
Heaps provide O(log n) insertion and deletion, making them optimal for priority queues compared to other structures.
Support = 100% - 45% - 30% = 25% of 120 = 30 employees.
count = 0
for i = 1 to 5
for j = 1 to i
count++
print count
The nested loop runs: 1+2+3+4+5 = 15 times. This is the sum of first 5 natural numbers.
Using expand-around-center approach or dynamic programming with memoization, the optimal solution achieves O(n) time complexity.
TCS extensively uses Agile methodologies combined with DevOps practices for faster delivery and continuous integration.
2x + 3 = 11 → 2x = 8 → x = 4
Let smaller number = x. Larger = x+5. Sum: x + (x+5) = 25 → 2x = 20 → x = 10. Larger = 15
TCS 2024-25 placement drive prioritizes Java and Python as primary programming languages, reflecting current industry trends