Two numbers are in the ratio 3:4. If their sum is 140, what is the larger number?
Let numbers be 3x and 4x. Sum = 7x = 140, so x = 20. Larger number = 4×20 = 80
What is the equation of a line passing through (2,3) with slope 4?
Using y - y₁ = m(x - x₁): y - 3 = 4(x - 2) → y = 4x - 5
A man spends 40% of his salary on food, 30% on rent, and saves the rest. If his salary is Rs. 50,000, how much does he save?
Savings = 100% - 40% - 30% = 30%. 30% of 50,000 = 15,000
If a person invests Rs. 5000 at 8% simple interest per annum for 3 years, what is the total amount?
SI = (P × R × T)/100 = (5000 × 8 × 3)/100 = 1200. Total = 5000 + 1200 = 6200
A number when divided by 7 leaves remainder 3. What is the number if the quotient is 8?
Number = Divisor × Quotient + Remainder = 7 × 8 + 3 = 56 + 3 = 59
Advertisement
If 3 men can complete a task in 8 days, how many men are needed to complete it in 6 days?
Total work = 3 × 8 = 24 man-days. Men needed = 624 = 4
What is the probability of getting a sum of 7 when two dice are rolled?
Favorable outcomes: (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) = 6. Total outcomes = 36. Probability = 366 = 61
Which programming language is most preferred by TCS for their 2024-25 placements?
TCS 2024-25 placement drive prioritizes Java and Python as primary programming languages, reflecting current industry trends
A number is 5 more than another number. If their sum is 25, find the larger number.
Let smaller number = x. Larger = x+5. Sum: x + (x+5) = 25 → 2x = 20 → x = 10. Larger = 15
Solve: 2x + 3 = 11
2x + 3 = 11 → 2x = 8 → x = 4
TCS follows which software development methodology as its primary approach?
TCS extensively uses Agile methodologies combined with DevOps practices for faster delivery and continuous integration.
In a coding problem, you need to find the longest palindromic substring. What would be the optimal time complexity?
Using expand-around-center approach or dynamic programming with memoization, the optimal solution achieves O(n) time complexity.
What is the output of the following pseudocode?
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.
A company has 120 employees. 45% work in development, 30% in testing, and remaining in support. How many work in support?
Support = 100% - 45% - 30% = 25% of 120 = 30 employees.
Which data structure is most efficient for implementing a priority queue in competitive programming?
Heaps provide O(log n) insertion and deletion, making them optimal for priority queues compared to other structures.
If the binary representation of a number is 10110, what is its decimal equivalent?
10110₂ = 1×16 + 0×8 + 1×4 + 1×2 + 0×1 = 16 + 4 + 2 = 22
What is the space complexity of the merge sort algorithm?
Merge sort requires O(n) extra space for creating temporary arrays during the merge process.
TCS's Digital platform focuses on which emerging technologies as of 2024-25?
TCS's digital transformation strategy emphasizes AI/ML, cloud computing, and cybersecurity as core competencies.
What does the time complexity O(2^n) indicate?
O(2^n) represents exponential time complexity, which becomes impractical for large input sizes (n > 40).
In a circular queue, if the array size is 10 and front=7, rear=2, how many elements are present?
In circular queue: elements = (rear - front + size) % size = (2 - 7 + 10) % 10 = 5. But accounting properly: 7,8,9,0,1,2 = 6 elements.