| Component | Details | |-----------|---------| | | 1 or 2 (typically 1 mandatory + 1 optional, or sometimes 2 mandatory) | | Total Time | 15–20 minutes for coding (within 90–120 minute overall test) | | Difficulty | Easy to Medium | | Languages Allowed | C, C++, Java, Python, Perl | | Evaluation | Automated (test cases – hidden + sample) | | Platform | TCS iON (custom compiler) |
A common problem involved identifying if a number was "sweet" based on the sum of its divisors or a specific digit-based pattern. Tcs Coding Questions 2021
Approach (Java):
1 ≤ length of string ≤ 10⁵
1210 → 1 zero, 2 ones, 1 two, 0 threes → Yes. 2020 → 2 zeros, 0 ones, 2 twos, 0 threes → Yes? Wait, check: In 2020, digits: 2,0,2,0. | Component | Details | |-----------|---------| | |