Tcs Coding - Questions 2021 __hot__
First line contains the text string. Second line contains the target keyword. Output: An integer representing the count of the keyword. Optimized Solution (Java)
Subarrays, rotating arrays, finding leaders in an array, matrix rotations, and two-pointer techniques.
Given an array of N integers and an integer K, find the number of unique pairs (i, j) with i < j such that arr[i] + arr[j] = K. Tcs Coding Questions 2021
Example: 45 → 45² = 2025 → split 20 + 25 = 45 → Yes. Square, convert to string, split, sum, compare.
5 1 2 3 4 5
#include<bits/stdc++.h> using namespace std;
Good luck with your TCS preparation!
To clear the coding round, you must master specific core modules. The 2021 questions heavily favored the following domains: